mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-26 12:14:24 +01:00
parent
4cfc262bfb
commit
98003318cd
@ -85,7 +85,10 @@ def handle_whois(irc, source, command, args):
|
|||||||
# 311: sends nick!user@host information
|
# 311: sends nick!user@host information
|
||||||
f(server, 311, source, "%s %s %s * :%s" % (nick, user.ident, user.host, user.realname))
|
f(server, 311, source, "%s %s %s * :%s" % (nick, user.ident, user.host, user.realname))
|
||||||
|
|
||||||
# 319: RPL_WHOISCHANNELS, shows public channel list of target
|
# 319: RPL_WHOISCHANNELS; Show public channels of the target, respecting
|
||||||
|
# hidechans umodes for non-oper callers.
|
||||||
|
isHideChans = (irc.umodes.get('hidechans'), None) in user.modes
|
||||||
|
if (not isHideChans) or (isHideChans and sourceisOper):
|
||||||
public_chans = []
|
public_chans = []
|
||||||
for chan in user.channels:
|
for chan in user.channels:
|
||||||
c = irc.channels[chan]
|
c = irc.channels[chan]
|
||||||
@ -146,6 +149,10 @@ def handle_whois(irc, source, command, args):
|
|||||||
# <- 317 GL GL 15 1437632859 :seconds idle, signon time
|
# <- 317 GL GL 15 1437632859 :seconds idle, signon time
|
||||||
f(server, 317, source, "%s 0 %s :seconds idle, signon time" % (nick, user.ts))
|
f(server, 317, source, "%s 0 %s :seconds idle, signon time" % (nick, user.ts))
|
||||||
|
|
||||||
|
if (irc.umodes.get('bot'), None) in user.modes:
|
||||||
|
# Show botmode info in WHOIS.
|
||||||
|
f(server, 335, source, "%s :is a bot" % nick)
|
||||||
|
|
||||||
# Call custom WHOIS handlers via the PYLINK_CUSTOM_WHOIS hook.
|
# Call custom WHOIS handlers via the PYLINK_CUSTOM_WHOIS hook.
|
||||||
irc.callHooks([source, 'PYLINK_CUSTOM_WHOIS', {'target': target, 'server': server}])
|
irc.callHooks([source, 'PYLINK_CUSTOM_WHOIS', {'target': target, 'server': server}])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user