mIRC Home    About    Download    Register    News    Help

Print Thread
#118975 30/04/05 07:15 PM
Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
Code:
on *:TEXT:!idle *:#: { 
  if ($2 == on) {
    if (%idlemsg == on) { msg $chan Already enabled. | halt }
    idlemsg on %myidlemsg
    set %idlemsg on
    msg $chan Enabled.
  }
  if ($2 == off) { 
    if (%idlemsg == off) { msg $chan Already disabled. | halt }
    idlemsg off
    set %idlemsg off
    msg $chan Disabled.
  }
  if ($2 == state) {
    msg $chan Idle State: %idlemsg -=- Time Remaining: $duration($timer(idlemsg).secs) -=- Time Set: %myidletimer
  }
  if ($2 == set) {
    set %myidletimer $3
    msg $chan Value set to: %myidletimer seconds
    idlemsg on %myidlemsg
    set %idlemsg on
  }
}


alias idlemsg {
  if ($1 == on) { .timeridlemsg 0 %myidletimer $$2- }
  if ($1 == off) { .timeridlemsg off }
}


ok %myidlemsg is the variable that displays the message, how do I set it so when I type !idle msg [the msg] it will idle that message? Note: spaces need to be allowed...


mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hey Forgotten, try this..

Code:
on *:TEXT:!idle *:#: { 
  if ($2 == on) {
    if (%idlemsg == on) { msg $chan Already enabled. | halt }
    idlemsg on %myidlemsg
    set %idlemsg on
    msg $chan Enabled.
  }
  if ($2 == off) { 
    if (%idlemsg == off) { msg $chan Already disabled. | halt }
    idlemsg off
    set %idlemsg off
    msg $chan Disabled.
  }
  if ($2 == state) {
    msg $chan Idle State: %idlemsg -=- Time Remaining: $duration($timer(idlemsg).secs) -=- Time Set: %myidletimer
  }
  if ($2 == set) {
    set %myidletimer $3
    msg $chan Value set to: %myidletimer seconds
    idlemsg on %myidlemsg
    set %idlemsg on
  }
  if ($2 == msg) {
    msg $chan Idle Msg now changed to $+(',$$3-,')
    idlemsg on msg $chan $$3-
  }
}

alias idlemsg {  
  if ($1 == on) { .timeridlemsg 0 %myidletimer $$2- }  
  if ($1 == off) { .timeridlemsg off }
}

Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
ThAnKiEs!


mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hehe, you're welcome. smile

Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
lawlerskate, I can always count on you!


mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Atleast one of us can count, I despise mathematics. :tongue:

Maths != my friend.

-Andy

Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
check it out! fully functional script!

http://justin.pyro-studios.com/misc/IdleScript%201-6.zip

Now Client-Side is not compeltely idiot-proof so be forewarned.

Also you have to set it up before you use it! smile


mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Looks pretty nice mate.

Nice work. smile

Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
now... how to add access? say only people with 100 can use the commands?


mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on [color:red]100[/color]:TEXT:!idle *:#: { 


All the best,

-Andy.

Joined: Apr 2005
Posts: 30
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2005
Posts: 30
and access levels work like this?

Code:
100:Silence


EDIT: how do I make it secure? IP addesses?

Last edited by Forgotten00; 30/04/05 09:24 PM.

mIRC Newb. smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sure.

But I'd rather you do something like:

/guser 100 Silence 8

(nick!*user@*.host format)

Rather than /auser 100 Sielce.

Reason being your one will let anyone have access who uses your nickname. So add nick!*user@*.host for security.

* Note: /guser command only works with someone who is currently connected to the serve, you'll get an error (no such user) otherwise. smile

-Andy

Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
shocked I never knew of the /guser command. I always used /auser $address($1,8). I guess I should have looked in the help file. blush


"God sometimes puts us in the dark for us to see the light"

Link Copied to Clipboard