Having a problem editing the output of a whois and whowas script currently..
It is the whowas (.lastid) i am having issues with. with the .msg #ops .. it outputs fine.. But with a large whowas.. i dont want it to flood the channel..
I have tried to swap .msg #ops to .msg $nick but no pm opens to the user issuing the command!
for the moment i have commented out the command to remove it from the ops menu of commands
Looking for a fix please.. and a limit to just 10 results being outputted.
raw 311:*: {
.msg #ops $2 $+ 's whois ID: $+($3,@,$4) and Real Name is: $6- | halt
}
raw 314:*: {
;.msg #ops $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6- | halt
;.msg $nick $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6- | halt
}
on *:text:*:#ops: {
if ($nick isop $chan) && ($regex($1-,/(^|\s)(.idshow?w?s?\s\S+)/i)) {
tokenize 32 $regml(2) | whois $2
}
if ($nick isop $chan) && ($regex($1-,/(^|\s)(.lastid?d?s?\s\S+)/i)) {
tokenize 32 $regml(2) | whowas $2
}
}
bot is mirc 7.55
Yeah I had trouble responding a couple days ago, but figured I'd make the fix publicly available. The issue was that $nick wasn't referencing what you expected. This was my solution:
Edited about an hour after original post with new link: https://pastebin.com/bAw6cA0j - This should go through all returned results.
Yeah but I can't reproduce the output, so here's what you should do.. Add this to your remotes:
raw *:*:{ echo -s $numeric $+ : $1- }
Then check all numbers that popup in the status window when someone triggers lastid. If the user exists, you will see 314, 369, and maybe something else? So that other number you see (not 406, this is user not found), take it and replace the number 9999 below with that number:
raw 9999:*: {
if ($hasActiveSearch(314,$2)) haltdef
}
And maybe that does the trick? Otherwise I don't really know what you mean... I don't really see a reason why any form of auto-scrolling / output would be displayed.
Don't forget to remove the first piece of code from your script afterwards.
not sure if this is what u meant but u can try it
on *:text:*:#ops: {
if ($nick isop $chan) && ($regex($1-,/(^|\s)(.idshow?w?s?\s\S+)/i)) {
set -u3 %whoisnicks $gettok($replace($gettok($2-,1-,46),$chr(32),$chr(44)),1,46)
if ($numtok(%whoisnicks,44) <= 10) {
tokenize 32 $regml(2) | whois $2
}
}
if ($nick isop $chan) && ($regex($1-,/(^|\s)(.lastid?d?s?\s\S+)/i)) {
set -u3 %whowasnicks $gettok($replace($gettok($2-,1-,46),$chr(32),$chr(44)),1,46)
if ($numtok(%whowasnicks,44) <= 10) {
tokenize 32 $regml(2) | whowas $2
}
}
}
Missed a few bits of code there.. but i fixed that bit.. however..
still errors.. the bot outputs everything to status still... but it does open the pm now.. but,... it only shows 1 result on the whowas! dont forget when you post a code to use square brackets with code and /code inside them.. [ code ] code here [ /code ] obviosly without the spaces in the square brackets :)