Created
December 23, 2014 16:16
-
-
Save foxlet/b9d015e3cce414f27ce6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usrcache = dict() | |
glob_chan = chan | |
@hook.irc_raw("352") | |
def who_summon(chan, conn, irc_raw=None): | |
irc_parsed = irc_raw.split(" ") | |
channel = str(irc_parsed[3]) | |
if channel == glob_chan: | |
user = str(irc_parsed[7]) | |
flags = irc_parsed[8] | |
hostname = irc_parsed[5] | |
key = (channel, conn.name, user) | |
if key not in usrcache: | |
usrcache[key] = [] | |
value = (user, hostname, flags) | |
usrcache[key].append(value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment