Uncommitted stuff
This commit is contained in:
parent
e0bdc6b3dd
commit
5b30cb8bc2
19
ircbot.py
19
ircbot.py
@ -103,16 +103,17 @@ class TCPClient:
|
||||
self.sendto(who, "Module '%s' unloaded." % nargs[0])
|
||||
|
||||
if ncmd == "load":
|
||||
if nargs[0] in [x.name for x in self.modules]:
|
||||
self.sendto(who, "ERROR: Module '%s' already loaded" % str(e))
|
||||
else:
|
||||
try:
|
||||
mod = monmodule(nargs[0], self)
|
||||
except Exception, e:
|
||||
self.sendto(who, "ERROR: %s" % str(e))
|
||||
for arg in nargs:
|
||||
if arg in [x.name for x in self.modules]:
|
||||
self.sendto(who, "ERROR: Module '%s' already loaded" % arg)
|
||||
else:
|
||||
self.modules.append(mod)
|
||||
self.sendto(who, "Module '%s' loaded." % nargs[0])
|
||||
try:
|
||||
mod = monmodule(arg, self)
|
||||
except Exception, e:
|
||||
self.sendto(who, "ERROR: %s" % str(e))
|
||||
else:
|
||||
self.modules.append(mod)
|
||||
self.sendto(who, "Module '%s' loaded." % arg)
|
||||
|
||||
def on_pubchat(self, who, chan, msg):
|
||||
if msg[:len(self.nick)] == self.nick:
|
||||
|
Loading…
Reference in New Issue
Block a user