Mercurial > xib
comparison commands.py @ 142:8c6184411ec7
minor fix in commands (unbound variable)
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 17 Jan 2010 11:41:56 +0100 |
parents | 931a5edc7971 |
children | 61d7cae1d15d |
comparison
equal
deleted
inserted
replaced
141:46c02cc89f18 | 142:8c6184411ec7 |
---|---|
151 bot.stop() | 151 bot.stop() |
152 return | 152 return |
153 | 153 |
154 | 154 |
155 def irc_participants(bot, command, args_array, bot_admin, bridge): | 155 def irc_participants(bot, command, args_array, bot_admin, bridge): |
156 ret = '' | |
156 if not bridge: | 157 if not bridge: |
157 for b in bot.bridges: | 158 for b in bot.bridges: |
158 irc_participants_nicknames = b.get_participants_nicknames_list(protocols=['irc']) | 159 irc_participants_nicknames = b.get_participants_nicknames_list(protocols=['irc']) |
159 ret += '\nparticipants on '+b.irc_room+' at '+b.irc_server+' ('+str(len(irc_participants_nicknames))+'): '+' '.join(irc_participants_nicknames) | 160 ret += '\nparticipants on '+b.irc_room+' at '+b.irc_server+' ('+str(len(irc_participants_nicknames))+'): '+' '.join(irc_participants_nicknames) |
160 return ret | 161 return ret |
181 bridge.stop() | 182 bridge.stop() |
182 return 'Bridge stopped.' | 183 return 'Bridge stopped.' |
183 | 184 |
184 | 185 |
185 def xmpp_participants(bot, command, args_array, bot_admin, bridge): | 186 def xmpp_participants(bot, command, args_array, bot_admin, bridge): |
187 ret = '' | |
186 if not bridge: | 188 if not bridge: |
187 for b in bot.bridges: | 189 for b in bot.bridges: |
188 xmpp_participants_nicknames = b.get_participants_nicknames_list(protocols=['xmpp']) | 190 xmpp_participants_nicknames = b.get_participants_nicknames_list(protocols=['xmpp']) |
189 ret += '\nparticipants on '+b.xmpp_room_jid+' ('+str(len(xmpp_participants_nicknames))+'): '+' '.join(xmpp_participants_nicknames) | 191 ret += '\nparticipants on '+b.xmpp_room_jid+' ('+str(len(xmpp_participants_nicknames))+'): '+' '.join(xmpp_participants_nicknames) |
190 return ret | 192 return ret |