Input help and $reg* questions. - 27/01/06 08:58 PM
var %a = $1-
1.In this code,
.echo -q $regsub(%a,/(?<=^| )(reg)(?= |$)/gi,\1ular,%a)
makes reg become regular, but not reg! become regular! it becomes reg!
same with reg?
2.What's a good way to make the word 'pm' become 'private message'
I already have this code:
while ($findtokcs(%a,pming,32)) %a = $puttok(%a,private messaging,$ifmatch,32)
this makes 'pming' become 'private messaging'
but
'pming?' becomes 'Pming?'
But I would also like one for pm, (without using $replace()).
Also, I have something like.
This works for if c isin or !isin $chan($active).mode.
But how would I be able to /say $strip(%a) in a +c channel but not have it in the default $1- text.
I don't want to do something like...
Because it's so redundant.
Also, I don't want to do something like..
Basically, if $1- is the string for on input, how do you return the output? Persay, final output, so I can /say $strip(%a($1-)).
*shrug*
1.In this code,
.echo -q $regsub(%a,/(?<=^| )(reg)(?= |$)/gi,\1ular,%a)
makes reg become regular, but not reg! become regular! it becomes reg!
same with reg?
2.What's a good way to make the word 'pm' become 'private message'
I already have this code:
while ($findtokcs(%a,pming,32)) %a = $puttok(%a,private messaging,$ifmatch,32)
this makes 'pming' become 'private messaging'
but
'pming?' becomes 'Pming?'
But I would also like one for pm, (without using $replace()).
Also, I have something like.
Code:
on *:input:*: { if ($istok(channel chat query status, $window($active).type, 32)) { if (/* !iswm $1) && ($left($1-,1) != $chr(60)) { var %a = $1- if this { /say $this(%a) } if that { /say $that(%a) } if this { if that { /say $thisthat(%a) } } /say %a } } }
This works for if c isin or !isin $chan($active).mode.
But how would I be able to /say $strip(%a) in a +c channel but not have it in the default $1- text.
I don't want to do something like...
Code:
on *:input:*: { if ($istok(channel chat query status, $window($active).type, 32)) { if (/* !iswm $1) && ($left($1-,1) != $chr(60)) { var %a = $1- if (c !isin $chan($active).mode) { if this { /say $this($a) } if that ( /say $that(%a) } if this { if that { /say $thisthat(%a) } } if (c isin $chan($active.mode) { if this { /say $strip($this($a)) } if that ( /say $strip($that(%a)) } if this { if that { /say $strip($thisthat(%a)) } } } } } }
Because it's so redundant.
Also, I don't want to do something like..
Code:
on *:input:*: { if ($istok(channel chat query status, $window($active).type, 32)) { if (/* !iswm $1) && ($left($1-,1) != $chr(60)) { var %a = $1- if this { /say $iif(c isin $chan($active.mode),$strip($this(%a)), $this(%a) } if that ( /say $iif(c isn $chan($active.mode, $strip($that(%a)), $that(%a) } if this { if that { /say $iif(c isin $chan($active).mode, $strip($thisthat(%a)), $thisthat(%a) } } /say $iif(c isin $chan($active).mode, $strip(%a), %a) } }
Basically, if $1- is the string for on input, how do you return the output? Persay, final output, so I can /say $strip(%a($1-)).
*shrug*