quit python when receiving quit from IRC

This commit is contained in:
Brian S. Stephan 2010-07-29 23:19:17 -05:00
parent 43d9d0ad66
commit 3d31d4f193
2 changed files with 2 additions and 1 deletions

1
TODO
View File

@ -19,4 +19,3 @@ dr.botzo --- TODO
* any interesting web service stuff?
* obligatory info command
* similar to FactFile module, a generic Trigger module
* make quit command end the entire program, rather than just quitting IRC

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ConfigParser import NoOptionError
import sys
from irclib import irclib
@ -100,6 +101,7 @@ class IrcAdmin(Module):
connection.quit(' '.join(whats[1:]))
with open('dr.botzo.cfg', 'w') as cfg:
self.config.write(cfg)
sys.exit()
def sub_autojoin_manipulate(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')