mIRC Home    About    Download    Register    News    Help

Print Thread
O
Om3gA
Om3gA
O
heh soem help on this would be nice... maybe im just blind but i cant figure it out =)

Users::::
30:Death4U!~Death4U@cpe-24-92-125-173.elp.rr.com

Remote:::::
on *:op:*:{
if (30 isin $level($address($opnick,2))) {
if ($me isin $opnick) { halt }
.mode $chan -o $opnick
}
}
on *:serverop:*:{
if (30 isin $level($address($opnick,2))) {
if ($me isin $opnick) { halt }
.mode $chan -o $opnick
}
}

maybe im a bit rusty maybe im just blind... or maybe im just over anylizing it

Joined: Mar 2004
Posts: 130
T
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
Code:
on @*:op:*:if ($level($address($opnick,2)) == 30) { mode $chan -o $opnick | halt }

on @*:serverop:*:if ($level($address($opnick,2)) == 30) { mode $chan -o $opnick | halt }


Joined: Jul 2003
Posts: 733
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jul 2003
Posts: 733
Code:
on @30:op:*: { mode $chan -o $opnick | halt }
on @30:serverop:*: { mode $chan -o $opnick | halt }

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
May I ask why you're both halting?

I
Iori
Iori
I
Code:
on @*:op:#:{ 
  if $level($ial($opnick)) == 30 { mode # -o $opnick } 
} 
Code:
on @*:serverop:#:{ 
  if $level($ial($opnick)) == 30 { mode # -o $opnick } 
} 


Joined: Jul 2003
Posts: 733
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jul 2003
Posts: 733
what are you doing? you do not need the if stuf...
Code:
on @30:op:*: { mode $chan -o $opnick }
on @30:serverop:*: { mode $chan -o $opnick }

I
Iori
Iori
I
Yes you do. OP wants to check if the user who is being opped is level 30. Your script triggers only when a level 30 user ops someone else.

O
Om3gA
Om3gA
O
and im halting incase someone with access sets one of my bots to level 30 so it cant deop its self when op'd wink nor can one of my other bots

thanks everyone for your help =)

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I think that was directed at me;

I was actually asking because it's pointless (from my perspective) to halt when there is nothing else to execute. Same basis as having:

if (condition) { statements }
else { halt }

There's just no need for it.

O
Om3gA
Om3gA
O
its primarily because if by some chance since my bots have remote commands someoen sets them so that they are all user level 30 (since more people then just myself use this) that it will halt and stop if the bot being op'd is actually a clone this can prevent someone from op/deop flooding using the bots features as an exploit if they are set to auto-op =) if you see what i mean anyway

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Sorry, I'm just tired. My inqueries were actually directed at MTec and tsoglanos. Sorry for the confusion.

O
Om3gA
Om3gA
O
ah ic well that was the reason for my haulting anyway =) all you guys have been of help though and i do appreciate it i was actually coding while reading this and caught myself halting for no reason after reading your post lol wink

Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
Quote:
Yes you do. OP wants to check if the user who is being opped is level 30. Your script triggers only when a level 30 user ops someone else


Sorry, but you're wrong there. The userlevel 30 is applied to whoever triggers the event. The person who triggers the event is the one who receives the +o, so MTec's code without the if statement is perfectly fine.


Link Copied to Clipboard