Skip to content
Snippets Groups Projects
Commit 1c9c5a68 authored by deuce's avatar deuce
Browse files

Deal with non-present nick.

parent 7443cea6
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,10 @@ Bot_Commands["WEATHER"].command = function (target,onick,ouh,srv,lvl,cmd) {
cmd.shift();
if(cmd[0])
nick=cmd[0];
if(srv.users[nick.toUpperCase()] == undefined) {
srv.o(target, nick+', who the f^@% is '+nick+"?");
}
else {
lstr=get_nicklocation(srv.users[nick.toUpperCase()].uh, srv.users[nick.toUpperCase()].servername, nick);
if (!lstr) {
var usr = new User(system.matchuser(nick));
......@@ -73,6 +77,7 @@ Bot_Commands["WEATHER"].command = function (target,onick,ouh,srv,lvl,cmd) {
break;
}
}
return true;
}
......
......@@ -27,6 +27,10 @@ Bot_Commands["WHEREIS"].command = function (target,onick,ouh,srv,lvl,cmd) {
return true;
}
if(srv.users[find.toUpperCase()] == undefined) {
lstr=find+', who the f^@% is '+find+"?";
}
else {
location=get_nicklocation(srv.users[find.toUpperCase()].uh, srv.users[find.toUpperCase()].servername, find);
if (location) {
lstr=find+' is ';
......@@ -50,6 +54,7 @@ Bot_Commands["WHEREIS"].command = function (target,onick,ouh,srv,lvl,cmd) {
if(!lstr)
lstr="Unable to locate "+find;
}
srv.o(target, lstr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment