]> jfr.im git - erebus.git/blobdiff - modules/admin_channel.py
admin_config - add !getconfig, remove some unused functions
[erebus.git] / modules / admin_channel.py
index d34e0ac514db224841f5a59ce005b9f69e803ace..88a6c5af6efc8e59da8303f35f2606d015f14772 100644 (file)
@@ -1,6 +1,6 @@
 # Erebus IRC bot - Author: Erebus Team
 # vim: fileencoding=utf-8
-# simple module example
+# Channel list management (add, remove channels)
 # This file is released into the public domain; see http://unlicense.org/
 
 # module info
@@ -62,8 +62,7 @@ def join(bot, user, chan, realtarget, *args):
 
 
 def _part(user, chan):
-       chan.bot.chans.remove(chan)
-       del lib.parent.chans[chan.name.lower()]
+       chan.deleting = True
        lib.parent.query("DELETE FROM chusers WHERE chan = %s", (chan,))
        lib.parent.query("DELETE FROM chans WHERE chname = %s", (chan,))
        chan.bot.part(chan)