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",
|
"realname": "CloudBot - http://git.io/cloudbotirc",
|
||||||
"nickserv_password": "",
|
"nickserv_password": "",
|
||||||
"channels": ["#cloudbot"],
|
"channels": ["#cloudbot"],
|
||||||
"invitejoin": true,
|
"invite_join": True,
|
||||||
"autorejoin": false,
|
"auto_rejoin": False,
|
||||||
"command_prefix": ".",
|
"command_prefix": ".",
|
||||||
"keep_alive": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disabled_plugins": [],
|
"disabled_plugins": [],
|
||||||
|
|
|
@ -10,8 +10,8 @@ socket.setdefaulttimeout(10)
|
||||||
# Auto-join on Invite (Configurable, defaults to True)
|
# Auto-join on Invite (Configurable, defaults to True)
|
||||||
@hook.event('INVITE')
|
@hook.event('INVITE')
|
||||||
def invite(paraml, conn=None):
|
def invite(paraml, conn=None):
|
||||||
invitejoin = conn.conf.get('invitejoin', True)
|
invite_join = conn.conf.get('invite_join', True)
|
||||||
if invitejoin:
|
if invite_join:
|
||||||
conn.join(paraml[-1])
|
conn.join(paraml[-1])
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
@ -20,7 +20,7 @@ def invite(paraml, conn=None):
|
||||||
# Rejoin on kick (Configurable, defaults to False)
|
# Rejoin on kick (Configurable, defaults to False)
|
||||||
@hook.event('KICK')
|
@hook.event('KICK')
|
||||||
def rejoin(paraml, conn=None):
|
def rejoin(paraml, conn=None):
|
||||||
autorejoin = conn.conf.get('autorejoin', False)
|
auto_rejoin = conn.conf.get('auto_rejoin', False)
|
||||||
if autorejoin:
|
if autorejoin:
|
||||||
conn.join(paraml[0])
|
conn.join(paraml[0])
|
||||||
else:
|
else:
|
||||||
|
@ -53,6 +53,12 @@ def onjoin(paraml, conn=None, bot=None):
|
||||||
print "onjoin() sucessfully completed."
|
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.singlethread
|
||||||
@hook.event('004')
|
@hook.event('004')
|
||||||
def keep_alive(paraml, conn=None):
|
def keep_alive(paraml, conn=None):
|
||||||
|
|
Reference in a new issue