mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
New command: /ipsearch
This commit is contained in:
parent
372ab73d56
commit
2fff4d999b
|
|
@ -206,6 +206,20 @@ var commands = exports.commands = {
|
|||
this.sendReply('|raw|'+output);
|
||||
},
|
||||
|
||||
ipsearch: function(target, room, user) {
|
||||
if (!this.can('rangeban')) return;
|
||||
var atLeastOne = false;
|
||||
this.sendReply("Users with IP "+target+":");
|
||||
for (var userid in Users.users) {
|
||||
var user = Users.users[userid];
|
||||
if (user.latestIp === target) {
|
||||
this.sendReply((user.connected?"+":"-")+" "+user.name);
|
||||
atLeastOne = true;
|
||||
}
|
||||
}
|
||||
if (!atLeastOne) this.sendReply("No results found.");
|
||||
},
|
||||
|
||||
/*********************************************************
|
||||
* Shortcuts
|
||||
*********************************************************/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user