mIRC Home    About    Download    Register    News    Help

Print Thread
#254410 09/08/15 01:39 PM
Joined: Aug 2015
Posts: 2
G
gigilal Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Aug 2015
Posts: 2
I am trying to get my bot to see if the person I want to give +o is already oped, and I made this script. But with this script he does not check Line 2 and 3 and jumps right down to line 6 & 7 even if I got op or not.

on *:text:!op*:#:{
if ($3 isop $2) {
/msg $chan Sorry $3 is already Op in $2 can't preform this command.
}
else {
/mode $2 +o $3
/msg $chan Giving $3 Op in $2 - Completed.
}
}
}

Also when I get this to work my next project is !deop and I am woundering if ($3 deop $2) is a command?

Thank you.

gigilal #254411 09/08/15 02:08 PM
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
! will ask for negative results.

if ($3 !isop $2) { }


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Nillen #254412 09/08/15 02:23 PM
Joined: Aug 2015
Posts: 2
G
gigilal Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Aug 2015
Posts: 2
Originally Posted By: Nillen
! will ask for negative results.

if ($3 !isop $2) { }


I added this one. Still he jumps over it and goes straight to the other lines.

<@gigilal1> !op #omg2k3k gigilal1
<@Admin__> Giving gigilal1 Op in #omg2k3k - Completed.

-------- Edit --------

Found out the problem, it was the tabs between the lines.

Last edited by gigilal; 09/08/15 02:34 PM.

Link Copied to Clipboard