Public Member Functions | |
| __construct ($server, $port) | |
| plugin ($plugin) | |
| write ($string) | |
| setNick ($nick) | |
| setUser ($user, $mode=0, $realname= 'PHPbot') | |
| setPass ($pass) | |
| setMaster ($master) | |
| createCommand ($comm, $rep) | |
| replyTo ($local) | |
| joinChannel ($channel) | |
| leaveChannel ($channel, $msg= 'leaving the channel') | |
| getNamesByChannel ($channel) | |
| inviteUser ($user, $channel) | |
| away ($msg= 'Busy') | |
| quit ($msg= 'bye bye') | |
| close () | |
Private Member Functions | |
| _writeLog ($msg) | |
| error ($pattern, $string, $mess, $die=false) | |
| error_ERR_ERRONEUSNICKNAME ($read) | |
| error_ERR_NICKNAMEINUSE ($read) | |
| error_ERR_NICKCOLLISION ($read) | |
| error_ERR_UNAVAILRESOURCE ($read) | |
| error_ERR_NOTONCHANNEL ($read) | |
| error_ERR_NOTREGISTERED_Brasnet ($read) | |
| error_ERR_NOTREGISTERED ($read) | |
| error_ERR_NEEDMOREPARAMS ($read) | |
| error_ERR_ALREADYREGISTRED ($read) | |
| error_ERR_CANNOTJOIN ($read) | |
| error_ERR_CHANOPRIVSNEEDED ($read) | |
| read () | |
| identifyCommand ($read) | |
| getNames ($read) | |
| listNames ($channel) | |
Private Attributes | |
| $stream = null | |
| $nick = 'unkn0wn' | |
| $user = '' | |
| $names = array() | |
| $comm = array() | |
| $master = '' | |
| $replyTo = '' | |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Definition at line 24 of file class.maxIrcBot.inc.
| maxIrcBot.__construct | ( | $ | server, | |
| $ | port | |||
| ) |
| String | $server | |
| Integer | $port Construtor |
Definition at line 46 of file class.maxIrcBot.inc.
| maxIrcBot._writeLog | ( | $ | msg | ) | [private] |
| String | $msg Guarda mensagem no histórico - it writes a message in the file bot.txt |
Definition at line 61 of file class.maxIrcBot.inc.
| maxIrcBot.away | ( | $ | msg = 'Busy' |
) |
| String | $msg Muda o estado para alway - it sets away mode |
Definition at line 375 of file class.maxIrcBot.inc.
References write().
| maxIrcBot.close | ( | ) |
Definition at line 398 of file class.maxIrcBot.inc.
References _writeLog(), error_ERR_ALREADYREGISTRED(), error_ERR_CANNOTJOIN(), error_ERR_CHANOPRIVSNEEDED(), error_ERR_ERRONEUSNICKNAME(), error_ERR_NEEDMOREPARAMS(), error_ERR_NICKCOLLISION(), error_ERR_NICKNAMEINUSE(), error_ERR_NOTONCHANNEL(), error_ERR_NOTREGISTERED(), error_ERR_NOTREGISTERED_Brasnet(), error_ERR_UNAVAILRESOURCE(), getNames(), identifyCommand(), and read().
| maxIrcBot.createCommand | ( | $ | comm, | |
| $ | rep | |||
| ) |
| String | $comm | |
| String | $rep Cria um comando a ser repondido - it creates a command for reply of the bot $comm - Comando - Command $rep - Resposta ao comando - reply of the bot |
Definition at line 255 of file class.maxIrcBot.inc.
References $comm.
| maxIrcBot.error | ( | $ | pattern, | |
| $ | string, | |||
| $ | mess, | |||
| $ | die = false | |||
| ) | [private] |
| String | $pattern | |
| String | $string | |
| String | $mess | |
| String | $die Debugger |
Definition at line 96 of file class.maxIrcBot.inc.
References _writeLog(), and quit().
Referenced by error_ERR_ALREADYREGISTRED(), error_ERR_CANNOTJOIN(), error_ERR_CHANOPRIVSNEEDED(), error_ERR_ERRONEUSNICKNAME(), error_ERR_NEEDMOREPARAMS(), error_ERR_NICKCOLLISION(), error_ERR_NICKNAMEINUSE(), error_ERR_NOTONCHANNEL(), error_ERR_NOTREGISTERED(), error_ERR_NOTREGISTERED_Brasnet(), and error_ERR_UNAVAILRESOURCE().
| maxIrcBot.error_ERR_ALREADYREGISTRED | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_CANNOTJOIN | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_CHANOPRIVSNEEDED | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_ERRONEUSNICKNAME | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NEEDMOREPARAMS | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NICKCOLLISION | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NICKNAMEINUSE | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NOTONCHANNEL | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NOTREGISTERED | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_NOTREGISTERED_Brasnet | ( | $ | read | ) | [private] |
| maxIrcBot.error_ERR_UNAVAILRESOURCE | ( | $ | read | ) | [private] |
| maxIrcBot.getNames | ( | $ | read | ) | [private] |
| String | $read Pega a lista dos usuários no canais e armazena - it gets users of a channel |
Definition at line 321 of file class.maxIrcBot.inc.
Referenced by close().
| maxIrcBot.getNamesByChannel | ( | $ | channel | ) |
| String | $channel Retorna os usuários do canal - it returns the users of a channel |
Definition at line 341 of file class.maxIrcBot.inc.
| maxIrcBot.identifyCommand | ( | $ | read | ) | [private] |
| String | $read Identifica os comandos - it identifies the commands |
Definition at line 266 of file class.maxIrcBot.inc.
References replyTo(), and write().
Referenced by close().
| maxIrcBot.inviteUser | ( | $ | user, | |
| $ | channel | |||
| ) |
| String | $user | |
| String | $channel Convida um usuário para um canal - it invites a user to go in a channel |
Definition at line 364 of file class.maxIrcBot.inc.
| maxIrcBot.joinChannel | ( | $ | channel | ) |
| String | $channel Entra em um canal - the bot enters in a channel |
Definition at line 296 of file class.maxIrcBot.inc.
References listNames(), and write().
| maxIrcBot.leaveChannel | ( | $ | channel, | |
| $ | msg = 'leaving the channel' | |||
| ) |
| String | $channel | |
| String | $msg Deixa o canal - the bot goes out |
Definition at line 310 of file class.maxIrcBot.inc.
References write().
| maxIrcBot.listNames | ( | $ | channel | ) | [private] |
| String | $channel Lista usuários do canal |
Definition at line 352 of file class.maxIrcBot.inc.
References write().
Referenced by joinChannel().
| maxIrcBot.plugin | ( | $ | plugin | ) |
| String | $plugin Carrega plugin - it loads a plugin |
Definition at line 78 of file class.maxIrcBot.inc.
| maxIrcBot.quit | ( | $ | msg = 'bye bye' |
) |
| String | $msg Sai do servidor - the bot goes out |
Definition at line 388 of file class.maxIrcBot.inc.
References write().
Referenced by error().
| maxIrcBot.read | ( | ) | [private] |
| maxIrcBot.replyTo | ( | $ | local | ) |
| String | $local Local de resposta do bot - the bot replies to a place |
Definition at line 285 of file class.maxIrcBot.inc.
Referenced by identifyCommand().
| maxIrcBot.setMaster | ( | $ | master | ) |
| String | $master Indica administrador do bot - set the master user of bot |
Definition at line 241 of file class.maxIrcBot.inc.
References $master.
| maxIrcBot.setNick | ( | $ | nick | ) |
| String | $nick Indica nick - set nick |
Definition at line 202 of file class.maxIrcBot.inc.
| maxIrcBot.setPass | ( | $ | pass | ) |
| String | $pass Indica senha - set password |
Definition at line 230 of file class.maxIrcBot.inc.
References write().
| maxIrcBot.setUser | ( | $ | user, | |
| $ | mode = 0, |
|||
| $ | realname = 'PHPbot' | |||
| ) |
| String | $user | |
| String | $mode | |
| String | $realname Define usuário - set user |
Definition at line 217 of file class.maxIrcBot.inc.
| maxIrcBot.write | ( | $ | string | ) |
Definition at line 185 of file class.maxIrcBot.inc.
Referenced by away(), identifyCommand(), inviteUser(), joinChannel(), leaveChannel(), listNames(), quit(), setNick(), setPass(), and setUser().
maxIrcBot.$comm = array() [private] |
maxIrcBot.$master = '' [private] |
maxIrcBot.$names = array() [private] |
Definition at line 32 of file class.maxIrcBot.inc.
maxIrcBot.$nick = 'unkn0wn' [private] |
maxIrcBot.$replyTo = '' [private] |
Definition at line 38 of file class.maxIrcBot.inc.
maxIrcBot.$stream = null [private] |
Definition at line 26 of file class.maxIrcBot.inc.
maxIrcBot.$user = '' [private] |
1.4.7