mIRC Homepage
Posted By: BritishGent To say Thank You - 08/01/07 01:55 AM
Hi there all smile

Can anyone tell me how i would make this work in any channel to say thanks for OPs and likewise for Voice ?

Code:
on *:OP:#chat,#help: { if (($opnick == $me) && ($nick != ChanServ))
{  //echo 7 -a [ $asctime(hh:nn:ss) ] You've been Oped by $nick in $chan $+ .
//msg $chan Thank you for the @ $nick } }


As i can not get it to work....


Many Thanks
Posted By: Kardafol Re: To say Thank You - 08/01/07 03:51 PM
Code:
on *:OP:#chat,#help: {
 if (($opnick == $me) && ($nick != ChanServ)) {
  echo 7 -a $asctime(hh:nn:ss) You've been Oped by $nick in $chan $+ .
  msg $chan Thank you for the @ $nick
 }
}
# ------ Untested ------

I can't spot any errors, but it may work if you clean it up (i.e: putting one command on a line, max).

EDIT: I can see the error now, you were putting the { bracket on the next line, causing mIRC to assume that there were no commands following the event, and doing nothing. i.e:
Code:
on *:event:
{ 
do this
}

should be:
Code:
on *:event: {
do this
}

and:
Code:
on *:event:
do this

should be:
Code:
on *:event: do this
Posted By: learn3r Re: To say Thank You - 08/01/07 05:15 PM
Code:
on *:OP:%chan: {
  if (($opnick == $me) && ($nick != ChanServ))  {
    echo 7 -a [ $asctime(hh:nn:ss) ] You've been Oped by $nick in $chan $+ .
    msg $chan Thank you for the @ $nick
  }
}
on *:voice:%chan:{
  if $vnick == $me {
    echo 7 -a [ $asctime(hh:nn:ss) ] You've been Voiced by $nick in $chan $+ .
    msg $chan Thank you for the +v $nick
  }
}
set %chan #chat,#help
Posted By: BritishGent Re: To say Thank You - 09/01/07 01:19 AM
I give up, can't get it to work at all frown
Posted By: learn3r Re: To say Thank You - 09/01/07 01:36 AM
Code:
($nick != ChanServ)

Posted By: RieDeLL Re: To say Thank You - 31/01/07 01:50 PM
if you are talking about a "Thanks For The @ ChanServ" Script here u may use mine!
Code:
on *:RAWMODE:#:{
  if (($1 == +v) && ($2 == $me)) { msg # 4Thanks for the 15+4 $nick $+ ! }
  if (($1 == +o) && ($2 == $me)) { msg # 4Thanks for the 15@4 $nick  $+ ! }
}
}
Posted By: learn3r Re: To say Thank You - 01/02/07 03:39 AM
Code:
($nick != ChanServ)

On your code there is a ($nick != ChanServ)
meaning it'll only work if somebody op`s or voices you..
but not if chanserv is the one who'll op you.
Posted By: Kurdish_Assass1n Re: To say Thank You - 01/02/07 05:24 AM
Originally Posted By: RieDeLL
if you are talking about a "Thanks For The @ ChanServ" Script here u may use mine!
Code:
on *:RAWMODE:#:{
  if (($1 == +v) && ($2 == $me)) { msg # 4Thanks for the 15+4 $nick $+ ! }
  if (($1 == +o) && ($2 == $me)) { msg # 4Thanks for the 15@4 $nick  $+ ! }
}
}

You have an extra bracket attached at the very end.

Code:
on *:RAWMODE:#:{
  if (($1 == +v) && ($2 == $me)) { msg # 4Thanks for the 15+4 $nick $+ ! }
  if (($1 == +o) && ($2 == $me)) { msg # 4Thanks for the 15@4 $nick $+ ! }
}
Posted By: learn3r Re: To say Thank You - 01/02/07 05:38 AM
Thanks but i'll use my auto thanks

Code:
on ^*:rawmode:#:{
  echo $colour(mode) $chan $nick Sets Mode:( $+ $1 $+ ) $2-
  if %thanks {
    var %lines = 3, %secs = 5, %ignore = 300
    var %id = $+(%,flood.,$cid,$site,#)
    inc $iif(!$var($(%id)),-u $+ %secs) $(%id)
    if ($(%id,2) >= %lines) { halt }
    else {
      if ($2 == $me) && ($nick != $me) && $istok(v o,$right($1,1),32) {
        if (+ isin $1) {
          %mode = ^ $+ $replace($right($1,1),v,+v,o,@) $+ ^
          msg $chan Thanks for the 9,1 %mode  $nick $+ !!!
        }
        if (- isin $1) {
          %mode = ^ $+ $replace($right($1,1),v,+v,o,@) $+ ^
          msg $chan Why did you took my 1,14 %mode  $nick %+ ?
        }
      }
    }
  }
  haltdef
}
Posted By: landonsandor Re: To say Thank You - 01/02/07 06:24 AM
(just replying to the this one, not saying the code is wrong)

and just to go a slightly different way, you could do this:

Code:
on *:RAWMODE:#:{
  if ($2 == me) {
   if ($1 == +v) { msg # 4Thanks for the 15+4 $nick $+ ! }
   if ($1 == +o) { msg # 4Thanks for the 15@4 $nick $+ ! }
  }
}



Just showing another way to do it.
© mIRC Discussion Forums