mIRC Homepage

Service Script dont work

Posted By: davi

Service Script dont work - 15/05/05 10:09 AM

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?
Posted By: RusselB

Re: Service Script dont work - 15/05/05 09:18 PM

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.
Posted By: DaveC

Re: Service Script dont work - 15/05/05 09:55 PM

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!
Posted By: davi

Re: Service Script dont work - 16/05/05 11:27 AM

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?
Posted By: DanielC

Re: Service Script dont work - 16/05/05 11:38 AM

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.
© 2021 mIRC Discussion Forums