mIRC Home    About    Download    Register    News    Help

Print Thread
#120215 15/05/05 10:09 AM
Joined: May 2005
Posts: 4
D
davi Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: May 2005
Posts: 4
hi,

i have create a service script, but there seems to be a problem, because it doesnt work, here the code:

Code:
 
on *:LOAD:{
  set %queuesystemchannel $$?="#DeinChannel"
}
on *:EXIT:{
  unset %queuesystem.*
}

on *:JOIN:%queuesystemchannel:{
  if ($nick != $me) && (%queuesystem = ON) {
    .notice $nick 4QUEUE-SYSTEM ON ~ WAIT TO GET VOICED
    inc %queuesystem.total
    set %queuesystem. [ $+ [ %queuesystem.total ] ] $nick
  }
}
on *:TEXT:*:%queuesystemchannel:{
  if ($nick isop $chan) {
    if ($1 == !queue) {
      if ($2 == on) { unset %queuesystem.* | set %queuesystem ON | mode $chan +m-c | .msg $chan 4QUEUE-SYSTEM TURNED ON ~ DON'T QUERY OPS ~ WAIT TO GET VOICE }
      elseif ($2 == off) { unset %queuesystem.* | set %queuesystem OFF | mode $chan -m | mode $chan +b-b * * | .msg $chan 4QUEUE-SYSTEM TURNED OFF }
      else { .msg $chan 4QUEUE-SYSTEM IS ATM %queuesystem $+  }
    }
    if ($1 == !next) {
      if (%queuesystem.user ison $chan) {
        mode $chan -v %queuesystem.user
        .timer 1 300 /queuesystemkb %queuesystem.user
      }
      unset %queuesystem. [ $+ [ %queuesystem.reg ] ]
      set %queuesystem.reg 1
      while (%queuesystem.reg <= %queuesystem.total) {
        if (%queuesystem. [ $+ [ %queuesystem.reg ] ] ison $chan) {
          set %queuesystem.user %queuesystem. [ $+ [ %queuesystem.reg ] ]
          .msg $chan 4 $+ %queuesystem. [ $+ [ %queuesystem.reg ] ] $+ , please ask your question ~ You will be helped by $nick $+ 
          mode $chan +v %queuesystem. [ $+ [ %queuesystem.reg ] ]
          halt
        }
        inc %queuesystem.reg
      }
    }
  }
}
alias queuesystemkb {
  if ($1 ison %queuesystemchannel) && ($1 !isop %queuesystemchannel) { 
    ban -u300 %queuesystemchannel $1 3
    kick %queuesystemchannel $1 4DON'T IDLE IN %queuesystemchannel ~ BANNED FOR 5 MINS
  }
}

 



can everybody help me?

Last edited by davi; 15/05/05 10:09 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You state that it's not working...what is it that it's not doing for you? I did a quick test in my room of the code as you posted it, and everything seemed to work fine.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
hes likely just erased the %queuesystemchannel value and now it wont work smile I couldnt see anything wrong with it while looking at it here.

The !queue on could be improved to not run if its already on, but besides that not much seemed outa place

(What a draconian channel tho!)

You Vill Vait In Silence, Dogs!

Joined: May 2005
Posts: 4
D
davi Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: May 2005
Posts: 4
well, now it works, but with !next the bot voiced also operators, do everyone help me to fix that problem, that only reg user can get voice?

Joined: Dec 2004
Posts: 11
D
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2004
Posts: 11
i'm not sure, haven't tested the script, but the only spot I see where someone is actually getting voiced is
Code:
   set %queuesystem.user %queuesystem. [ $+ [ %queuesystem.reg ] ]
          .msg $chan 4 $+ %queuesystem. [ $+ [ %queuesystem.reg ] ] $+ , please ask your question ~ You will be helped by $nick $+ 
          mode $chan +v %queuesystem. [ $+ [ %queuesystem.reg ] ]
          halt 

portion of code. Try adding an if statement in front of the last line thier.
Code:
 if ($nick != $opnick) mode $chan +v %queuesystem. [ $+ [ %queuesystem.reg ] ] 
I think that should take care of the problem.


Link Copied to Clipboard