Package gozerbot :: Module bot :: Class Bot
[hide private]
[frames] | no frames]

Class Bot

source code

     object --+        
              |        
botbase.BotBase --+    
                  |    
            irc.Irc --+
                      |
                     Bot

class that dispatches commands and checks for callbacks to fire

Instance Methods [hide private]
 
__init__(self, name='main', owner=[])
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
_resume(self, data, reto)
resume to server/port using nick
source code
 
_dccresume(self, sock, nick, userhost, channel=None)
loop for dcc commands
source code
 
_dcclisten(self, nick, userhost, channel)
accept dcc chat requests
source code
 
_dodcc(self, sock, nick, userhost, channel=None)
loop for dcc commands
source code
 
_dccloop(self, sock, nick, userhost, channel=None) source code
 
_dccconnect(self, nick, userhost, addr, port)
connect to dcc request from nick
source code
 
reconnect(self)
reconnect and if succesfull join channels
source code
 
joinchannels(self)
join channels
source code
 
broadcast(self, txt) source code
 
send(self, txt)
call Irc send and check for monitor callbacks
source code
 
save(self)
saves channels and state
source code
 
stop(self)
stop the bot
source code
 
exit(self)
save data, quit the bot and do shutdown
source code
 
getchannelmode(self, channel)
send MODE request for channel
source code
 
join(self, channel, password=None)
join a channel ..
source code
 
say(self, printto, what, who=None, how='msg', fromm=None, speed=5)
output what to printto
source code
 
handle_privmsg(self, ievent)
check if PRIVMSG is command, if so dispatch
source code
 
handle_join(self, ievent)
handle joins
source code
 
handle_kick(self, ievent)
handle kick event
source code
 
handle_nick(self, ievent)
update userhost cache on nick change
source code
 
handle_part(self, ievent)
handle parts
source code
 
handle_ievent(self, ievent)
check for callbacks, call Irc method
source code
 
handle_quit(self, ievent)
check if quit is because of a split
source code
 
handle_mode(self, ievent)
check if mode is about channel if so request channel mode
source code
 
handle_311(self, ievent)
handle 311 response ..
source code
 
handle_352(self, ievent)
handle 352 response ..
source code
 
handle_353(self, ievent)
handle 353 ..
source code
 
handle_324(self, ievent)
handle mode request responses
source code
 
handle_invite(self, ievent)
join channel if invited by OPER
source code
 
settopic(self, channel, txt)
set topic of channel to txt
source code
 
gettopic(self, channel)
get topic data
source code
 
test(self, txt, timeout=0, kw={})
run txt with test ievent
source code
 
testasync(self, txt, timeout=0, kw={})
run txt with test ievent
source code

Inherited from irc.Irc: action, close, connect, ctcp, ctcpreply, delop, doconnect, donick, doop, fakein, handle_001, handle_401, handle_432, handle_433, handle_ctcp, handle_error, handle_notice, handle_ping, handle_pong, logon, names, notice, onconnect, out, output, outputnolog, outputsizes, part, ping, privmsg, putonqueue, quit, readloop, sendraw, shutdown, voice, who, whois

Inherited from botbase.BotBase: connectwithjoin, ownercheck

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name='main', owner=[])
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

_resume(self, data, reto)

source code 

resume to server/port using nick

Overrides: irc.Irc._resume
(inherited documentation)

reconnect(self)

source code 

reconnect and if succesfull join channels

Overrides: irc.Irc.reconnect

joinchannels(self)

source code 

join channels

Overrides: botbase.BotBase.joinchannels

broadcast(self, txt)

source code 
Overrides: botbase.BotBase.broadcast

send(self, txt)

source code 

call Irc send and check for monitor callbacks

Overrides: botbase.BotBase.send

save(self)

source code 

saves channels and state

Overrides: botbase.BotBase.save

stop(self)

source code 

stop the bot

Overrides: botbase.BotBase.stop

exit(self)

source code 

save data, quit the bot and do shutdown

Overrides: botbase.BotBase.exit

join(self, channel, password=None)

source code 

join a channel .. use optional password

Overrides: irc.Irc.join

say(self, printto, what, who=None, how='msg', fromm=None, speed=5)

source code 

output what to printto

Overrides: irc.Irc.say

handle_privmsg(self, ievent)

source code 

check if PRIVMSG is command, if so dispatch

Overrides: irc.Irc.handle_privmsg

handle_ievent(self, ievent)

source code 

check for callbacks, call Irc method

Overrides: irc.Irc.handle_ievent

handle_311(self, ievent)

source code 

handle 311 response .. sync with userhosts cache

handle_352(self, ievent)

source code 

handle 352 response .. sync with userhosts cache

handle_353(self, ievent)

source code 

handle 353 .. check if we are op