Renamed some config options because I'm evil
This commit is contained in:
parent
a7299b2aa6
commit
51484a2c11
2 changed files with 11 additions and 6 deletions
|
@ -20,10 +20,9 @@ if not os.path.exists('config'):
|
|||
"realname": "CloudBot - http://git.io/cloudbotirc",
|
||||
"nickserv_password": "",
|
||||
"channels": ["#cloudbot"],
|
||||
"invitejoin": true,
|
||||
"autorejoin": false,
|
||||
"invite_join": True,
|
||||
"auto_rejoin": False,
|
||||
"command_prefix": ".",
|
||||
"keep_alive": false
|
||||
}
|
||||
},
|
||||
"disabled_plugins": [],
|
||||
|
|
|
@ -10,8 +10,8 @@ socket.setdefaulttimeout(10)
|
|||
# Auto-join on Invite (Configurable, defaults to True)
|
||||
@hook.event('INVITE')
|
||||
def invite(paraml, conn=None):
|
||||
invitejoin = conn.conf.get('invitejoin', True)
|
||||
if invitejoin:
|
||||
invite_join = conn.conf.get('invite_join', True)
|
||||
if invite_join:
|
||||
conn.join(paraml[-1])
|
||||
else:
|
||||
return None
|
||||
|
@ -20,7 +20,7 @@ def invite(paraml, conn=None):
|
|||
# Rejoin on kick (Configurable, defaults to False)
|
||||
@hook.event('KICK')
|
||||
def rejoin(paraml, conn=None):
|
||||
autorejoin = conn.conf.get('autorejoin', False)
|
||||
auto_rejoin = conn.conf.get('auto_rejoin', False)
|
||||
if autorejoin:
|
||||
conn.join(paraml[0])
|
||||
else:
|
||||
|
@ -53,6 +53,12 @@ def onjoin(paraml, conn=None, bot=None):
|
|||
print "onjoin() sucessfully completed."
|
||||
|
||||
|
||||
@hook.event("KICK")
|
||||
def onkick(paraml, conn=None, chan=None):
|
||||
# if the bot has been kicked, remove from the channel list
|
||||
if paraml[1] == conn.nick:
|
||||
conn.channels.remove(chan)
|
||||
|
||||
@hook.singlethread
|
||||
@hook.event('004')
|
||||
def keep_alive(paraml, conn=None):
|
||||
|
|
Reference in a new issue