allow nick changing in commands

now you can change nick via input.set_nick
This commit is contained in:
Patrick Hurst 2010-08-16 04:36:47 -04:00
parent 4cc12512ff
commit 91124d1f8a
1 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,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):