From 91124d1f8a6329ad396cc23200ffe4db6a163a54 Mon Sep 17 00:00:00 2001 From: Patrick Hurst Date: Mon, 16 Aug 2010 04:36:47 -0400 Subject: [PATCH] allow nick changing in commands now you can change nick via input.set_nick --- core/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/main.py b/core/main.py index aedb0e3..c05c703 100644 --- a/core/main.py +++ b/core/main.py @@ -24,6 +24,9 @@ class Input(dict): def pm(msg): conn.msg(nick, msg) + + def set_nick(nick): + conn.set_nick(nick) def me(msg): conn.msg(chan, "\x01%s %s\x01" % ("ACTION", msg)) @@ -35,7 +38,7 @@ class Input(dict): params=params, nick=nick, user=user, host=host, paraml=paraml, msg=msg, server=conn.server, chan=chan, notice=notice, say=say, reply=reply, pm=pm, bot=bot, - me=me, lastparam=paraml[-1]) + me=me, set_nick=set_nick, lastparam=paraml[-1]) # make dict keys accessible as attributes def __getattr__(self, key):