mIRC Home    About    Download    Register    News    Help

Print Thread
#26710 28/05/03 09:27 PM
V
very_confused
very_confused
V
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.

#26711 28/05/03 09:32 PM
B
bugx
bugx
B
this is the code :

press Alt+R and Paste...

on ^1:RAWMODE:#: { if ($1 == +v) && ($2 == $me) { msg $chan thanks for the voice $nick } }

#26712 28/05/03 10:20 PM
C
codemastr
codemastr
C
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!
   }
}

#26713 29/05/03 12:02 AM
B
bugx
bugx
B
Ups, you are rigth... your code is much better
than my

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

blush

#26714 29/05/03 01:23 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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

#26715 29/05/03 01:35 AM
S
saxon
saxon
S
ON OP, ON VOICE , ON HELP, is cleaner, simpler and nicer. And in your code, /var is more appropriate than set -u0.

#26716 29/05/03 01:38 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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.

#26717 29/05/03 01:41 AM
S
saxon
saxon
S
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.

#26718 29/05/03 01:57 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I think my preference is what i chose to use, and feel comfortable using.

#26719 29/05/03 02:26 AM
P
pheonix
pheonix
P
which is the same reason you shouldnt criticise my
else {
HALT
}
smirk

#26720 29/05/03 02:33 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
neg-- my script won't work without /set's or vars--your will work without a useless else

#26721 29/05/03 03:25 AM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
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

#26722 29/05/03 04:49 PM
L
laser
laser
L
Where is this code placed

#26723 29/05/03 05:16 PM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
In a 'remotes' script file. Press Alt+R to open the remotes editor.

#26724 29/05/03 10:44 PM
L
laser
laser
L
how can i make this seen on the open channel instead of just the op computer.

#26725 29/05/03 10:55 PM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
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!
  }
}


Link Copied to Clipboard