diff --git a/oyoyo/client.py b/oyoyo/client.py index 30dc0c0..ccda636 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -70,7 +70,8 @@ def add_commands(d): @add_commands(("join", "mode", "nick", - "who")) + "who", + "cap")) class IRCClient(object): """ IRC Client class. This handles one connection to a server. This can be used either with or without IRCApp ( see connect() docs ) diff --git a/oyoyo/ircevents.py b/oyoyo/ircevents.py index 205840f..09c929d 100644 --- a/oyoyo/ircevents.py +++ b/oyoyo/ircevents.py @@ -98,6 +98,7 @@ numeric_events = { b"351": "version", b"352": "whoreply", b"353": "namreply", + b"354": "whospcrpl", b"361": "killdone", b"362": "closing", b"363": "closeend", diff --git a/wolfgame.py b/wolfgame.py index 22e6ef0..87536ff 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -41,9 +41,8 @@ def connect_callback(cli): cli.join(botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL) - @hook("whoreply", id=294) - def on_whoreply(cli, server, dunno, chan, ident, - cloak, dunno3, user, status, dunno4): + @hook("whospcrpl", id=294) + def on_whoreply(cli, server, nick, ident, cloak, user, acc): if user in var.USERS: return # Don't add someone who is already there if user == botconfig.NICK: cli.nickname = user @@ -55,8 +54,10 @@ def connect_callback(cli): def afterwho(*args): decorators.unhook(HOOKS, 294) + cli.cap("REQ", "extended-join") + cli.cap("REQ", "account-notify") - cli.who(botconfig.CHANNEL) + cli.who(botconfig.CHANNEL, "%nuha") if botconfig.JOIN_AFTER_CLOAKED: prepare_stuff = hook("event_hosthidden", id=294)(prepare_stuff) @@ -944,7 +945,7 @@ def update_last_said(cli, nick, chan, rest): @hook("join") -def on_join(cli, raw_nick, chan): +def on_join(cli, raw_nick, chan, acc="", rname=""): nick,m,u,cloak = parse_nick(raw_nick) if nick not in var.USERS.keys() and nick != botconfig.NICK: var.USERS[nick] = cloak