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])
|
self.sendto(who, "Module '%s' unloaded." % nargs[0])
|
||||||
|
|
||||||
if ncmd == "load":
|
if ncmd == "load":
|
||||||
if nargs[0] in [x.name for x in self.modules]:
|
for arg in nargs:
|
||||||
self.sendto(who, "ERROR: Module '%s' already loaded" % str(e))
|
if arg in [x.name for x in self.modules]:
|
||||||
else:
|
self.sendto(who, "ERROR: Module '%s' already loaded" % arg)
|
||||||
try:
|
|
||||||
mod = monmodule(nargs[0], self)
|
|
||||||
except Exception, e:
|
|
||||||
self.sendto(who, "ERROR: %s" % str(e))
|
|
||||||
else:
|
else:
|
||||||
self.modules.append(mod)
|
try:
|
||||||
self.sendto(who, "Module '%s' loaded." % nargs[0])
|
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):
|
def on_pubchat(self, who, chan, msg):
|
||||||
if msg[:len(self.nick)] == self.nick:
|
if msg[:len(self.nick)] == self.nick:
|
||||||
|
Loading…
Reference in New Issue
Block a user