mIRC Home    About    Download    Register    News    Help

Print Thread
#61890 26/11/03 06:12 AM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
i have this add on

on ^*:NOTICE:*:*: {
.window -n @botserv 300 400 500 200
if ($nick == botserv) /echo @botserv 12,0 $1- | write $mircdirong\bot.ong $2- | halt
}

i want the window botserv only show if i am an op

thnx


mess with the best
#61891 26/11/03 06:23 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Your event deals with all kinds of notices, channel and private alike. Therefor, "if I am an op" has no meaning to this event. The only thing you can do is

1. if you are in 1 channel:
if ($me isop #channelname) { ... }
2. if you are in more than 1 channel:
create a loop that cycles through $chan and checks all channels if you are op in 1 or all of em.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#61892 26/11/03 06:25 AM
Joined: Nov 2003
Posts: 22
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Nov 2003
Posts: 22
Code:
on ^*:NOTICE:*:*: {
if ([color:red]YOUR NICK[/color] isop $chan ) {
.window -n @botserv 300 400 500 200
if ($nick == botserv) /echo @botserv 12,0 $1- | write $mircdirong\bot.ong $2- | halt
}
} 
this is untested but it should work

#61893 26/11/03 07:07 AM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
on ^*:NOTICE:*:*: {
if ($nick == $me isop $chan ) {
.window -n @botserv 300 400 500 200
if ($nick == botserv) /echo @botserv 12,0 $1- | write $mircdirong\bot.ong $2- | halt
}
}

or this

on ^*:NOTICE:*:*: {
if ($nick == VerDuGo isop $chan ) {
.window -n @botserv 300 400 500 200
if ($nick == botserv) /echo @botserv 12,0 $1- | write $mircdirong\bot.ong $2- | halt
}
}


mess with the best
#61894 26/11/03 11:22 AM
Joined: Nov 2003
Posts: 67
C
Babel fish
Offline
Babel fish
C
Joined: Nov 2003
Posts: 67
I donĀ“t think that botserv send a notice to a channel, Locutus suggest make a loop.
You can save the name the channel in a var too.
and then

ON ^*:NOTICE:*:*:{
if (($me isop %thechansave) && ($nick == BotServ)) {
.window -n @BotServ 300 400 500 200
echo @botserv 12,0 $1-
write $mircdirong\bot.ong $2-
}
haltdef
}





irc.universochat.net
#escripting
#61895 26/11/03 08:14 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I already said earlier, that your notice event doesn't come with a channel attached, so $chan has no value. I also gave you the proper if statement, why you wish to butcher it is beyond me.

Code:
if ($me isop #channelname) { stuff-to-do-goes-here }


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard