mIRC Home    About    Download    Register    News    Help

Print Thread
#168379 08/01/07 01:55 AM
Joined: Oct 2006
Posts: 82
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 82
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

Last edited by BritishGent; 08/01/07 01:55 AM.

Never ASSUME!!!

As it often makes and ASS out of U and ME!!
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
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

Last edited by Kardafol; 08/01/07 03:55 PM.

Those who can, cannot. Those who cannot, can.
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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


learn learn learn
Joined: Oct 2006
Posts: 82
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 82
I give up, can't get it to work at all frown


Never ASSUME!!!

As it often makes and ASS out of U and ME!!
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Code:
($nick != ChanServ)



learn learn learn
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
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  $+ ! }
}
}


while ($noob = $true) { .stfu }
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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.


learn learn learn
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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 $+ ! }
}


-Kurdish_Assass1n
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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
}


learn learn learn
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
(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.


Those who fail history are doomed to repeat it

Link Copied to Clipboard