Skip to content

Instantly share code, notes, and snippets.

@foxlet
Created December 23, 2014 16:16
Show Gist options
  • Save foxlet/b9d015e3cce414f27ce6 to your computer and use it in GitHub Desktop.
Save foxlet/b9d015e3cce414f27ce6 to your computer and use it in GitHub Desktop.
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