[irc] pass nick to pause function
This commit is contained in:
parent
91e7b4c5c5
commit
0bfb6d117b
@ -19,10 +19,10 @@ class Bot(object):
|
|||||||
# channel - channel to autojoin and interact with
|
# channel - channel to autojoin and interact with
|
||||||
# channelPassword - if channel is +k
|
# channelPassword - if channel is +k
|
||||||
# functions - list/tuple of functions that can be used from the bot:
|
# functions - list/tuple of functions that can be used from the bot:
|
||||||
# * pause(room, state=bool)
|
# * pause(setBy, room, state=bool)
|
||||||
# * getRooms() -> list
|
# * getRooms() -> list
|
||||||
# * getPosition(room) -> int
|
# * getPosition(room) -> int
|
||||||
# * setPosition(room, seconds)
|
# * setPosition(setBy, room, seconds)
|
||||||
# * getUsers(room) -> list of {'nick': str, 'file': str, 'length': int}
|
# * getUsers(room) -> list of {'nick': str, 'file': str, 'length': int}
|
||||||
# * isPaused(room) -> bool
|
# * isPaused(room) -> bool
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ class Bot(object):
|
|||||||
else:
|
else:
|
||||||
out += chr(3) + '2' + user['nick'] + chr(15) + ', '
|
out += chr(3) + '2' + user['nick'] + chr(15) + ', '
|
||||||
i += 1
|
i += 1
|
||||||
self.msg(to, out)
|
self.msg(nickFrom, to, out)
|
||||||
else:
|
else:
|
||||||
self.msg(to, chr(2) + 'Usage:' + chr(15) + ' !roominfo [room]')
|
self.msg(to, chr(2) + 'Usage:' + chr(15) + ' !roominfo [room]')
|
||||||
elif split[0].lower() == '!pause':
|
elif split[0].lower() == '!pause':
|
||||||
@ -146,7 +146,7 @@ class Bot(object):
|
|||||||
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick is not in the specified room')
|
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick is not in the specified room')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.functions[6](room, True)
|
self.functions[6](nickFrom, room, True)
|
||||||
else:
|
else:
|
||||||
self.msg(to, chr(2) + 'Usage:' + chr(15) + ' !pause [room]')
|
self.msg(to, chr(2) + 'Usage:' + chr(15) + ' !pause [room]')
|
||||||
elif split[0].lower() == '!play':
|
elif split[0].lower() == '!play':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user