mIRC Homepage
Posted By: very_confused thank you messages - 28/05/03 09:27 PM
often when i am in a channel i see people saying "thank you for voice" when they get voiced. i would like to know what the code for this is.
Posted By: bugx Re: thank you messages - 28/05/03 09:32 PM
this is the code :

press Alt+R and Paste...

on ^1:RAWMODE:#: { if ($1 == +v) && ($2 == $me) { msg $chan thanks for the voice $nick } }
Posted By: codemastr Re: thank you messages - 28/05/03 10:20 PM
Thats a rather bad way to do it. What if they typed +mv yournick? Or +vvv somenick somenick yournick?

Code:
ON *:VOICE:#:{
   if ($vnick == $me && $nick != chanserv) {
      .msg $chan Hey $nick thanks for the +v!
   }
}
Posted By: bugx Re: thank you messages - 29/05/03 12:02 AM
Ups, you are rigth... your code is much better
than my

When i thing 1stuff, you thing 6 stuff =P

blush
Posted By: KingTomato Re: thank you messages - 29/05/03 01:23 AM
you could always do..

alias parsemodes {
/set -u0 %param 2
/set -u0 %m 1
while (%m <= $len($gettok($1, 1, 32))) {
/set -u0 %chr $mid($gettok($1, 1, 32), %m, 1)
if (%chr isin +-) { /set -u0 %mod %chr }
else {
if ((%chr isincs $remove($gettok($chanmodes,1-3,44),$chr(44))) || (%chr isincs qaohv)) {
/set -u0 %modes $addtok(%modes, $+(%mod,%chr,:,$gettok($1, %param, 32)), 32)
/inc -u0 %param
}
else { /set -u0 %modes $addtok(%modes, $+(%mod,%chr), 32) }
}
/inc -u0 %m
}
return %modes
}

on 1:RAWMODE:#: {
if ($nick != #me) && ($nick != ChanServ) {
if ($istok($parsemodes($1-), $+(+v:,$me), 32)) { /msg $chan Thank you for the voice, $nick $+ ! }
else if ($istok($parsemodes($1-), $+(+h:,$me), 32)) { /msg $chan Thank you for the halfop, $nick $+ ! }
else if ($istok($parsemodes($1-), $+(+o:,$me), 32)) { /msg $chan Thank you for the op, $nick $+ ! }
}
}

>:D
Posted By: saxon Re: thank you messages - 29/05/03 01:35 AM
ON OP, ON VOICE , ON HELP, is cleaner, simpler and nicer. And in your code, /var is more appropriate than set -u0.
Posted By: KingTomato Re: thank you messages - 29/05/03 01:38 AM
First off that was a joke. Like i would write 20+lines more code, for what 4 (tops) could do. Secondly, they are var and set are personal preference. Sometimes I have variable last for 3 seconds, givimg me time to use them in anopther alias/remote without them staying in the variables list forever.
Posted By: saxon Re: thank you messages - 29/05/03 01:41 AM
Ok, when you need a variable to last for 3 seconds and be accessed outside the alias /set -uN is appropriate. But in this instance where /set -u0 is used, I think your prefernce should be /var.
Posted By: KingTomato Re: thank you messages - 29/05/03 01:57 AM
I think my preference is what i chose to use, and feel comfortable using.
Posted By: pheonix Re: thank you messages - 29/05/03 02:26 AM
which is the same reason you shouldnt criticise my
else {
HALT
}
smirk
Posted By: KingTomato Re: thank you messages - 29/05/03 02:33 AM
neg-- my script won't work without /set's or vars--your will work without a useless else
Posted By: _D3m0n_ Re: thank you messages - 29/05/03 03:25 AM
damn man why are u still arguing over ppls posting comments to your posts that u dont like? all this is just opinions and preferences in scripting ...... hes entitled to his as u are entitled to urs ..... i think he was posting to urs to help u out to show u that u had useless code into yours ..... here your just pluggin the board looking for more attention ..... let it be
Posted By: laser Re: thank you messages - 29/05/03 04:49 PM
Where is this code placed
Posted By: Nimue Re: thank you messages - 29/05/03 05:16 PM
In a 'remotes' script file. Press Alt+R to open the remotes editor.
Posted By: laser Re: thank you messages - 29/05/03 10:44 PM
how can i make this seen on the open channel instead of just the op computer.
Posted By: Nimue Re: thank you messages - 29/05/03 10:55 PM
Just remove the dot from in front of msg
Code:
ON *:VOICE:#:{
  if ($vnick == $me &amp;&amp; $nick != chanserv) {
    msg $chan Hey $nick thanks for the +v!
  }
}
© mIRC Discussion Forums