maxIrcBot Class Reference

List of all members.

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 = ''

Detailed Description

maxIrcBot

Version:
2.1
Author:
Max Rosan <[email protected]>
LICENSE

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.


Constructor & Destructor Documentation

maxIrcBot.__construct ( server,
port 
)

Returns:
void
Parameters:
String $server
Integer $port Construtor

Definition at line 46 of file class.maxIrcBot.inc.


Member Function Documentation

maxIrcBot._writeLog ( msg  )  [private]

Returns:
void
Parameters:
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.

Referenced by close(), and error().

maxIrcBot.away ( msg = 'Busy'  ) 

Returns:
void
Parameters:
String $msg Muda o estado para alway - it sets away mode

Definition at line 375 of file class.maxIrcBot.inc.

References write().

maxIrcBot.close (  ) 

Returns:
void finaliza e roda o bot - it closes the actions

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 
)

Returns:
void
Parameters:
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]

Returns:
void
Parameters:
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]

Definition at line 167 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_CANNOTJOIN ( read  )  [private]

Definition at line 173 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_CHANOPRIVSNEEDED ( read  )  [private]

Definition at line 179 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_ERRONEUSNICKNAME ( read  )  [private]

Definition at line 114 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NEEDMOREPARAMS ( read  )  [private]

Definition at line 161 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NICKCOLLISION ( read  )  [private]

Definition at line 128 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NICKNAMEINUSE ( read  )  [private]

Definition at line 121 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NOTONCHANNEL ( read  )  [private]

Definition at line 142 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NOTREGISTERED ( read  )  [private]

Definition at line 155 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_NOTREGISTERED_Brasnet ( read  )  [private]

Definition at line 149 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.error_ERR_UNAVAILRESOURCE ( read  )  [private]

Definition at line 135 of file class.maxIrcBot.inc.

References error().

Referenced by close().

maxIrcBot.getNames ( read  )  [private]

Returns:
void
Parameters:
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  ) 

Returns:
Array
Parameters:
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]

Returns:
void
Parameters:
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 
)

Returns:
void
Parameters:
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.

References $user, and write().

maxIrcBot.joinChannel ( channel  ) 

Returns:
void
Parameters:
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' 
)

Returns:
void
Parameters:
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]

Returns:
void
Parameters:
String $channel Lista usuários do canal

Definition at line 352 of file class.maxIrcBot.inc.

References write().

Referenced by joinChannel().

maxIrcBot.plugin ( plugin  ) 

Returns:
Object
Parameters:
String $plugin Carrega plugin - it loads a plugin

Definition at line 78 of file class.maxIrcBot.inc.

maxIrcBot.quit ( msg = 'bye bye'  ) 

Returns:
void
Parameters:
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]

Definition at line 191 of file class.maxIrcBot.inc.

Referenced by close().

maxIrcBot.replyTo ( local  ) 

Returns:
void
Parameters:
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  ) 

Returns:
void
Parameters:
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  ) 

Returns:
void
Parameters:
String $nick Indica nick - set nick

Definition at line 202 of file class.maxIrcBot.inc.

References $nick, and write().

maxIrcBot.setPass ( pass  ) 

Returns:
void
Parameters:
String $pass Indica senha - set password

Definition at line 230 of file class.maxIrcBot.inc.

References write().

maxIrcBot.setUser ( user,
mode = 0,
realname = 'PHPbot' 
)

Returns:
void
Parameters:
String $user
String $mode
String $realname Define usuário - set user

Definition at line 217 of file class.maxIrcBot.inc.

References $user, and write().

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().


Member Data Documentation

maxIrcBot.$comm = array() [private]

Definition at line 34 of file class.maxIrcBot.inc.

Referenced by createCommand().

maxIrcBot.$master = '' [private]

Definition at line 36 of file class.maxIrcBot.inc.

Referenced by setMaster().

maxIrcBot.$names = array() [private]

Definition at line 32 of file class.maxIrcBot.inc.

maxIrcBot.$nick = 'unkn0wn' [private]

Definition at line 28 of file class.maxIrcBot.inc.

Referenced by setNick().

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]

Definition at line 30 of file class.maxIrcBot.inc.

Referenced by inviteUser(), and setUser().


The documentation for this class was generated from the following file:
Generated on Sat Sep 9 14:11:35 2006 for Kn1ght by  doxygen 1.4.7
Hosted by www.Geocities.ws

1