mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-11 06:07:53 +00:00
IRC Bot fixes.
This commit is contained in:
parent
1aad0ee586
commit
4ceecf1bbf
@ -78,7 +78,7 @@ class Bot(object):
|
||||
except socket.error, info:
|
||||
self.active = False
|
||||
print '\033[91mSocket error (bot disconnected)\033[0;0m ' + str(info)
|
||||
break
|
||||
|
||||
def msg(self, who, message):
|
||||
self.sockSend('PRIVMSG ' + who + ' :' + message)
|
||||
def join(self, channel, passw=''):
|
||||
|
@ -58,7 +58,6 @@ class SyncFactory(Factory):
|
||||
ircConnectionData['channelPassword'] = line.split(": ")[1]
|
||||
elif("irc.channel: " in line):
|
||||
ircConnectionData['channel'] = line.split(": ")[1]
|
||||
|
||||
return ircConnectionData
|
||||
|
||||
def setupIRCBot(self, ircConnectionData):
|
||||
@ -70,16 +69,19 @@ class SyncFactory(Factory):
|
||||
self.getRoomUsernames,
|
||||
self.isRoomPaused,
|
||||
]
|
||||
self.ircBot = IRCBot(
|
||||
ircConnectionData['server'],
|
||||
ircConnectionData['serverPassword'],
|
||||
ircConnectionData['port'],
|
||||
ircConnectionData['nick'],
|
||||
ircConnectionData['nickservPass'],
|
||||
ircConnectionData['channel'],
|
||||
ircConnectionData['channelPassword'],
|
||||
botFunctions,
|
||||
)
|
||||
try:
|
||||
self.ircBot = IRCBot(
|
||||
ircConnectionData['server'],
|
||||
ircConnectionData['serverPassword'],
|
||||
ircConnectionData['port'],
|
||||
ircConnectionData['nick'],
|
||||
ircConnectionData['nickservPass'],
|
||||
ircConnectionData['channel'],
|
||||
ircConnectionData['channelPassword'],
|
||||
botFunctions,
|
||||
)
|
||||
except:
|
||||
print "IRC Bot could not be started, please check your configuration"
|
||||
|
||||
def buildProtocol(self, addr):
|
||||
return SyncServerProtocol(self)
|
||||
|
Loading…
Reference in New Issue
Block a user