mIRC Home    About    Download    Register    News    Help

Print Thread
Bot Script (whois) #62405 30/11/03 05:53 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Hi, im making a script for my bot..

Here is how it need to work:
1. msg bot: !status <nick>
2. Bot takes a whois on nick
3. If nick is irc oper, return notice: nick is a irc oper (and the bot will halt his command)
4. Else send command to nick, ect: msg nick hello there

Get it? :tongue:

Re: Bot Script (whois) #62406 30/11/03 06:26 PM
Joined: Oct 2003
Posts: 30
pleur Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
just use the on TEXT....

or do you think we write the script for you?


------
Cheers m8!
Re: Bot Script (whois) #62407 30/11/03 06:32 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
on text ffs... will that work?!

Re: Bot Script (whois) #62408 01/12/03 08:36 AM
Joined: Oct 2003
Posts: 30
pleur Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
on *:TEXT:!status*:*:{
If ($1) {
echo - Put command's in here, the parameter is filled and the command was requested by $nick
}
}


(I'm not sure about the first line, 'cause i've no mIRC around here, just use the mIRC Help)


------
Cheers m8!
Re: Bot Script (whois) #62409 01/12/03 01:52 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
on *:TEXT:!status*:*:{
If ($1) {
echo - Put command's in here, the parameter is filled and the command was requested by $nick
}
}

let's see, the event will trigger if the text starts with !status, so $0 >= 1 in the event, so the $1 parameter exists all the time(!status is actually $1), but it can also be !statuswhateverwewanthere, but it doesn't matter, the point is that the if ( $1 ) is totally useless statement

on *:TEXT:!status *:*:{
If ($2) {
set %status.whois %status.whois $2
set $+(%,status.,$2) $nick
whois $2
enable #!statuswhois
}
}

#!statuswhois off
raw 313:*: {
if ( $2 isin %status.whois ) {
%status.whois = $remtok(%status.whois,$2,32)
if ( !%status.whois ) disable #!statuswhois
msg $eval($+(%,status.,$2),2) $2 is IRCop
}
}
#!statuswhois end

I'd use something like this.... This isn't tested of course, but it should work...



Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Bot Script (whois) #62410 02/12/03 10:37 AM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Isn't your checking for $2 pointless as the matchtext all ready checks that there are at least 2 tokens.