mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2006
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Aug 2006
Posts: 2
I'm looking for a simple mirc script that will 1) Trigger on the eggdrop bot's public msg to a channel 2) do a whois to verify that it's my bot 3) op the bot.

So, for example, the bot does:

putserv "PRIVMSG #mychan : op me or I shall go NI!"

The script should do a whois and make sure the bot's netmask matches whatever.users.undernet.org

If it matches, op the bot so it'll shut up


Any help appreciated.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on @*:text:*op me*:#:{
set %chan $chan
.enable #bot.check
.whois $nick
}
#bot.check off
raw 311:*:{
if $4 == whatever.users.undernet.org {
.mode %chan +o $nick
}
halt
}
raw 318:*:{
.disable #bot.check
haltdef
}
#bot.check end
 

Joined: Aug 2006
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Aug 2006
Posts: 2
Thank you!! smile Will have a friend test (I don't use windows/mirc myself) but I expect it'll work just fine smile

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
1. Add bot to mirc script users list:
/auser eggdrop your!bot@host

2. Paste code to remote:
Code:
 
on @eggdrop:text:*op me*:#:{
mode # +o $nick
}
 


No need for /whois


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard