show userhost as well as nickname in !maskfind output
This commit is contained in:
parent
c19d20dec2
commit
70be211a16
1 changed files with 5 additions and 3 deletions
|
@ -29,11 +29,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
searched += len(userhosts)
|
searched += len(userhosts)
|
||||||
for userhost in userhosts:
|
for userhost in userhosts:
|
||||||
if hostmask.match(userhost):
|
if hostmask.match(userhost):
|
||||||
nicknames.add(nickname)
|
nicknames.add((nickname, userhost))
|
||||||
|
|
||||||
if nicknames:
|
if nicknames:
|
||||||
|
outs = []
|
||||||
|
for nickname, userhost in sorted(nicknames):
|
||||||
|
outs.append("%s (%s)" % (nickname, userhost))
|
||||||
event["stdout"].write("%s (%d/%d): %s" %
|
event["stdout"].write("%s (%d/%d): %s" %
|
||||||
(hostmask_str, len(nicknames), searched,
|
(hostmask_str, len(nicknames), searched, ", ".join(outs)))
|
||||||
", ".join(sorted(nicknames))))
|
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("Hostmask not found")
|
event["stderr"].write("Hostmask not found")
|
||||||
|
|
Loading…
Reference in a new issue