[irc] Fix error message when user is not on the server

This commit is contained in:
HarHar 2013-01-24 19:43:12 -02:00
parent a45bb6858e
commit 5425652914

View File

@ -138,10 +138,8 @@ class Bot(object):
for u in users: for u in users:
if u['nick'] == nickFrom: if u['nick'] == nickFrom:
self.functions[6](nickFrom, True) self.functions[6](nickFrom, True)
break return
else: self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
return
elif split[0].lower() == '!play': elif split[0].lower() == '!play':
rooms = self.functions[1]() rooms = self.functions[1]()
@ -150,10 +148,8 @@ class Bot(object):
for u in users: for u in users:
if u['nick'] == nickFrom: if u['nick'] == nickFrom:
self.functions[6](nickFrom, False) self.functions[6](nickFrom, False)
break return
else: self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
self.msg(to, chr(3) + '5Error!' + chr(15) + ' Your nick was not found on the server')
return
elif split[0].lower() == '!help': elif split[0].lower() == '!help':
self.msg(to, chr(2) + 'Available commands:' + chr(15) + ' !rooms / !roominfo [room] / !pause / !play') self.msg(to, chr(2) + 'Available commands:' + chr(15) + ' !rooms / !roominfo [room] / !pause / !play')