mIRC Home    About    Download    Register    News    Help

Print Thread
#47234 05/09/03 12:25 AM
Joined: Dec 2002
Posts: 24
R
RODF Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 24
How I make to take off my Op when to be more than 10 minutes away?
I tried this:

if ($me isop $chan) { /timer1 0 600 /mode $chan -o $me }
What´s wrong??

#47235 05/09/03 12:27 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
try
if ($me isop $chan) { set %chan $chan | /timer1 0 600 /mode %chan -o $me }


new username: tidy_trax
#47236 05/09/03 12:49 AM
Joined: Aug 2003
Posts: 144
M
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Like this

Last edited by Miguel_A; 05/09/03 12:58 AM.
#47237 05/09/03 01:27 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
...
Like what?

#47238 05/09/03 04:18 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Code:
on *:OP:[color:blue]#channelname[/color]: {
  [color:green]; start checking when you get ops[/color]
  if ($opnick == $me) .timerdeop 0 60 deopcheck $chan
}
[color:green] [/color]
alias deopcheck {
  [color:green]; check if you're opped and idle[/color]
  if ($me isop $1) && ($awaytime > 600) {
    [color:green]; deop yourself[/color]
    .mode $1 -o $me 
    [color:green]; we won't be needing that timer anymore[/color]
    .timerdeop off
  }
}


Change the parts in blue before using. You can also replace $awaytime with $idle to do 10 minutes idle. Just cause when you're set as away it doesn't have to mean you necessarily are smile


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#47239 05/09/03 04:23 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
And how would that code check if he's away or not? It will deop him no matter what. Also -- why did you use %chan in the timer and not simply $chan? Saves you from having to set a variable, and also keeps your variables section nice and clean as you don't remove the variable when you're done with it either.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#47240 05/09/03 10:37 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i thought, he meant, after he gets op, he goes away.....
i use %chan because sometimes $chan doesnt work in timers, dunno if im alone on that :tongue:.


new username: tidy_trax
#47241 05/09/03 04:10 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
If you use $chan in a event that initializes it, it will work.


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

Link Copied to Clipboard