|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
raw 319:*:{ Nick is on: +#Channel1 @#Channel2 -#Channel3 }
How can I remove these stupid statuses on whois (@ - + etc.)???
|
|
|
|
Joined: Feb 2006
Posts: 164
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 164 |
$3- would be the channels in that raw. so $remove($3-,@,+,-)
|
|
|
|
Joined: Feb 2006
Posts: 546
Fjord artisan
|
Fjord artisan
Joined: Feb 2006
Posts: 546 |
raw 319:*:{
echo -a $2 is on $regsubex($3-,/(?<=^| )[\Q $+ $prefix $+ \E]+/g,)
halt
}
try that :>
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
uhm ... nope, doesn't work anyhow ... $remove($3-,@,+,-) shouldn't remove the signs when they're in the middel or in the end of the channelname. The command u gave me even removes every sign that could be found on the channelname. But it should only remove the sign if it's behind the "#" sign. if the channel is called e.g. #my-channel, nothing should be removed. So if it's called -#my-channel, remove the - sign that is behind the channelname.
|
|
|
|
Joined: Feb 2006
Posts: 164
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 164 |
In that case, if you're using mIRC 6.17, use jaytea's code snippet, as it uses the new regex identifier and $prefix, that should solve it.
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
jaytea's code doesn't work. Nothing appears but "Nick is on" PS. I'm using mIRC 6.16
|
|
|
|
Joined: Feb 2006
Posts: 164
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 164 |
Yeah that's why i mentioned 6.17 as it contains the new identifier.
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
So is there a way to work it out? Cuz i'm working on a script and It's almost finished, so the only problem I have, is this! 
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
using $mid you can check to see if the first character is # and if it is not # then get the $len of the item use var %len = $len(@#channel-1) - 1 var %newitem = $mid(item,2,%len)
then replace the original $1 $2 whatever with %newitem
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
Similar to Mike's method. raw 319:*:{
echo -a Nick is on $remprefix($3-)
}
alias remprefix {
var %i = 1, %l = $numtok($1-,32), %chans
while (%i <= %l) {
if ($left($gettok($1-,%i,32),1) == $chr(35)) %chans = %chans $gettok($1-,%i,32)
else %chans = %chans $+($chr(35),$gettok($gettok($1-,%i,32),2,35))
inc %i
}
return %chans
}
|
|
|
|
Joined: Mar 2006
Posts: 50
Babel fish
|
OP
Babel fish
Joined: Mar 2006
Posts: 50 |
uhm ... thank you guys but it seems to be a little more complicated. I think it's better to paste the script to here. Function: After I whoised someone, i should get the infos (through /cs acc <WhoisChannels> <Nick>) what kind of statuses the user has "IN A REGISTERED CHANNEL". So if any channels are NOT registered we find it out and as well avoid using /cs acc. The Script raw 319:*:{
set %nick.status $2
if ($3) { set %moder.3 $remprefix($3) }
if ($4) { set %moder.4 $remprefix($4) }
if ($5) { set %moder.5 $remprefix($5) }
if ($6) { set %moder.6 $remprefix($6) }
if ($7) { set %moder.7 $remprefix($7) }
if ($8) { set %moder.8 $remprefix($8) }
if ($9) { set %moder.9 $remprefix($9) }
if ($10) { set %moder.10 $remprefix($10) }
modemaker
}
alias remprefix {
var %i = 1, %l = $numtok($1-,32), %chans
while (%i <= %l) {
if ($left($gettok($1-,%i,32),1) == $chr(35)) %chans = %chans $gettok($1-,%i,32)
else %chans = %chans $+($chr(35),$gettok($gettok($1-,%i,32),2,35))
inc %i
}
return %chans
}
alias getmode {
.enable #getmode
mode $1
}
alias modemaker {
.enable #getmode
if (%moder.3) { mode %moder.3 }
if (%moder.4) { .timer 1 1 mode %moder.4 }
if (%moder.5) { .timer 1 4 mode %moder.5 }
if (%moder.6) { .timer 1 7 mode %moder.6 }
if (%moder.7) { .timer 1 10 mode %moder.7 }
if (%moder.8) { .timer 1 13 mode %moder.8 }
if (%moder.9) { .timer 1 16 mode %moder.9 }
if (%moder.10) { .timer 1 19 mode %moder.10 }
}
#getmode on
raw 324:*: {
if (%moder.3 isin $1-) { set %newmode.3 $2 }
if (%moder.4 isin $1-) { set %newmode.4 $2 }
if (%moder.5 isin $1-) { set %newmode.5 $2 }
if (%moder.6 isin $1-) { set %newmode.6 $2 }
if (%moder.7 isin $1-) { set %newmode.7 $2 }
if (%moder.8 isin $1-) { set %newmode.8 $2 }
if (%moder.9 isin $1-) { set %newmode.9 $2 }
if (%moder.10 isin $1-) { set %newmode.10 $2 }
if (%newmode.3 isin $1-) && (r isin $3-) { cs acc %moder.3 %nick.status } { halt }
if (%newmode.4 isin $1-) && (r isin $3-) { cs acc %moder.4 %nick.status } { halt }
if (%newmode.5 isin $1-) && (r isin $3-) { cs acc %moder.5 %nick.status } { halt }
if (%newmode.6 isin $1-) && (r isin $3-) { cs acc %moder.6 %nick.status } { halt }
if (%newmode.7 isin $1-) && (r isin $3-) { cs acc %moder.7 %nick.status } { halt }
if (%newmode.8 isin $1-) && (r isin $3-) { cs acc %moder.8 %nick.status } { halt }
if (%newmode.9 isin $1-) && (r isin $3-) { cs acc %moder.9 %nick.status } { halt }
if (%newmode.10 isin $1-) && (r isin $3-) { cs acc %moder.10 %nick.status } { halt }
unset %nick.status
unset %moder.*
unset %newmode.*
}
raw 329:*: {
.disable #getmode
halt
}
#getmode end
The problemIf -, +, % etc. is in middel of a channelname, (e.g. #my-channel) the script doesn't work.
|
|
|
|
|