Changeset 129
- Timestamp:
- 03/05/08 23:40:26 (9 months ago)
- Files:
-
- trunk/Phergie/Plugin/Nickserv.php (modified) (4 diffs)
- trunk/Phergie/Plugin/Set.php (modified) (1 diff)
- trunk/Phergie/phergie.ini (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Nickserv.php
r106 r129 27 27 protected $nick; 28 28 29 30 /** 31 * The name of the nickserv bot 32 * 33 * @var string 34 */ 35 protected $botNick; 36 29 37 /** 30 38 * Initializes instance variables. … … 37 45 38 46 $this->nick = $this->getIni('nick'); 47 48 // Get the name of the NickServ bot, defaults to NickServ 49 $this->botNick = $this->getIni('bot_nick'); 50 if (!$this->botNick) $this->botNick = 'NickServ'; 39 51 } 40 52 … … 63 75 public function onNotice() 64 76 { 65 if ( $this->event->getNick() == 'NickServ') {77 if (strtolower($this->event->getNick()) == strtolower($this->botNick)) { 66 78 $message = $this->event->getArgument(1); 67 79 if ($message == 'This nickname is owned by someone else') { 68 80 $password = $this->getPluginIni('password'); 69 81 if (! empty($password)) { 70 $this->doPrivmsg( 'NickServ', 'IDENTIFY ' . $password);82 $this->doPrivmsg($this->botNick, 'IDENTIFY ' . $password); 71 83 } 72 84 } elseif (preg_match('/^.*' . $this->nick . '.* has been killed/', $message)) { … … 102 114 if (!empty ($password)) { 103 115 $this->doPrivmsg( 104 'NickServ',116 $this->botNick, 105 117 'GHOST ' . $this->nick . ' ' . $password 106 118 ); trunk/Phergie/Plugin/Set.php
r128 r129 40 40 file_put_contents($ini, $contents); 41 41 } 42 43 public function onDoGet($var) 44 { 45 $val = $this->getIni($var); 46 $this->doPrivmsg($this->event->getSource(), $var.' = '.($val===null?'null':$val)); 47 } 42 48 43 49 /** trunk/Phergie/phergie.ini
r107 r129 56 56 57 57 ; ignore : 58 ; a comma- or space-delimited list of hostmasks (may contain wildcards 59 ; using *) of users from which events should be ignored (i. e. not 58 ; a comma- or space-delimited list of hostmasks (may contain wildcards 59 ; using *) of users from which events should be ignored (i. e. not 60 60 ; processed by plugins), surrounded by double-quotes 61 ignore = 61 ignore = 62 62 63 63 ; plugins : … … 175 175 176 176 ; nickserv.password : 177 ; password to use when identifying the bot to NickServwhere177 ; password to use when identifying the bot to the NickServ bot where 178 178 ; authentication will only take place if a non-empty password is specified 179 179 nickserv.password = 180 181 ; nickserv.bot_nick : 182 ; The name of the bot that the server uses for Nickerv authentication. 183 ; Defaults to NickServ is left blank. 184 nickserv.bot_nick = "NickServ" 180 185 181 186 ;----------------------------------------------------------------------------- … … 190 195 ; SpellCheck 191 196 ;----------------------------------------------------------------------------- 192 197 193 198 ; spellcheck.lang : 194 ; dictionary language to use, defaults to en (English) 199 ; dictionary language to use, defaults to en (English) 195 200 spellcheck.lang = "en" 196 197 ; spellcheck.limit : 198 ; limit on the number of potential correct spellings to return, defaults 201 202 ; spellcheck.limit : 203 ; limit on the number of potential correct spellings to return, defaults 199 204 ; to 5 200 205 spellcheck.limit = 5