PageRenderTime 46ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/MD5.php

https://github.com/noother/Nimda
PHP | 38 lines | 13 code | 7 blank | 18 comment | 1 complexity | 3898dbf195d6ea47ae6797414b0a18f2 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /*
  3. This file is part of Nimda - An advanced event-driven IRC Bot written in PHP with a nice plugin system
  4. Copyright (C) 2009 noother [noothy@gmail.com]
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  16. */
  17. class MD5 extends Plugin {
  18. function isTriggered() {
  19. if(!isset($this->info['text'])) {
  20. $this->sendOutput($this->CONFIG['usage']);
  21. return;
  22. }
  23. $output = 'md5("'.$this->info['text'].'") => '.md5($this->info['text']);
  24. $this->sendOutput($output);
  25. return;
  26. }
  27. }
  28. ?>