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:
|
except socket.error, info:
|
||||||
self.active = False
|
self.active = False
|
||||||
print '\033[91mSocket error (bot disconnected)\033[0;0m ' + str(info)
|
print '\033[91mSocket error (bot disconnected)\033[0;0m ' + str(info)
|
||||||
break
|
|
||||||
def msg(self, who, message):
|
def msg(self, who, message):
|
||||||
self.sockSend('PRIVMSG ' + who + ' :' + message)
|
self.sockSend('PRIVMSG ' + who + ' :' + message)
|
||||||
def join(self, channel, passw=''):
|
def join(self, channel, passw=''):
|
||||||
|
@ -58,7 +58,6 @@ class SyncFactory(Factory):
|
|||||||
ircConnectionData['channelPassword'] = line.split(": ")[1]
|
ircConnectionData['channelPassword'] = line.split(": ")[1]
|
||||||
elif("irc.channel: " in line):
|
elif("irc.channel: " in line):
|
||||||
ircConnectionData['channel'] = line.split(": ")[1]
|
ircConnectionData['channel'] = line.split(": ")[1]
|
||||||
|
|
||||||
return ircConnectionData
|
return ircConnectionData
|
||||||
|
|
||||||
def setupIRCBot(self, ircConnectionData):
|
def setupIRCBot(self, ircConnectionData):
|
||||||
@ -70,16 +69,19 @@ class SyncFactory(Factory):
|
|||||||
self.getRoomUsernames,
|
self.getRoomUsernames,
|
||||||
self.isRoomPaused,
|
self.isRoomPaused,
|
||||||
]
|
]
|
||||||
self.ircBot = IRCBot(
|
try:
|
||||||
ircConnectionData['server'],
|
self.ircBot = IRCBot(
|
||||||
ircConnectionData['serverPassword'],
|
ircConnectionData['server'],
|
||||||
ircConnectionData['port'],
|
ircConnectionData['serverPassword'],
|
||||||
ircConnectionData['nick'],
|
ircConnectionData['port'],
|
||||||
ircConnectionData['nickservPass'],
|
ircConnectionData['nick'],
|
||||||
ircConnectionData['channel'],
|
ircConnectionData['nickservPass'],
|
||||||
ircConnectionData['channelPassword'],
|
ircConnectionData['channel'],
|
||||||
botFunctions,
|
ircConnectionData['channelPassword'],
|
||||||
)
|
botFunctions,
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
print "IRC Bot could not be started, please check your configuration"
|
||||||
|
|
||||||
def buildProtocol(self, addr):
|
def buildProtocol(self, addr):
|
||||||
return SyncServerProtocol(self)
|
return SyncServerProtocol(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user