| View previous topic :: View next topic |
| Author |
Message |
demeteor Quite Active
Joined: 31 Jan 2008 Posts: 29
|
Posted: Thu Jan 31, 2008 12:51 pm Post subject: Common channels alias |
|
|
How to use:
/scomchans <nick>
And you should get on Echo that is saying your commom channels with <nick >
| Code: | Code:
alias scomchans {
var %nchan = 1
unset %comchans
while (%nchan <= $comchan($1,0)) {
set %comchans %comchans $comchan($1,%nchan)
inc %nchan
}
echo -a Common channels with $1 $+ : %comchans
} |
_________________ -Meteor |
|
| Back to top |
|
 |
Ook Major
Joined: 01 May 2004 Posts: 68
|
Posted: Fri Feb 01, 2008 4:17 pm Post subject: |
|
|
| Code: |
alias scomchans {
var %nchan = 1, %comchans
while ($comchan($1,%nchan) != $null) {
var %c = $v1
if ($calc($len(%comchans) + $len(%c)) > 850) {
echo -a Common channels with $1 $+ : %comchans
var %comchans = %c
}
else var %comchans = $addtok(%comchans,%c,32)
inc %nchan
}
echo -a Common channels with $1 $+ : %comchans
}
|
This one handles line too long. |
|
| Back to top |
|
 |
demeteor Quite Active
Joined: 31 Jan 2008 Posts: 29
|
Posted: Sun Feb 03, 2008 7:44 am Post subject: |
|
|
yeah thanks for the correction i have not added any validation rules :/ _________________ -Meteor |
|
| Back to top |
|
 |
SplitFire Quite Active

Joined: 24 Jan 2008 Posts: 30 Location: Neverlands
|
Posted: Wed Dec 16, 2009 7:17 am Post subject: |
|
|
| Code: | alias comchans {
var %meh $1
return $regsubex($str($chr(44),$comchan($me,0)),/./g,$+($comchan(%meh,\n),$chr(32)))
} |
--~ _________________ boo.. and stuff. |
|
| Back to top |
|
 |
Josh earlybird
Joined: 19 Oct 2008 Posts: 9 Location: Ontario, Canada
|
Posted: Sun Dec 20, 2009 4:06 pm Post subject: |
|
|
| SplitFire wrote: | | Code: | alias comchans {
var %meh $1
return $regsubex($str($chr(44),$comchan($me,0)),/./g,$+($comchan(%meh,\n),$chr(32)))
} |
--~ |
| Code: |
alias comchans return $regsubex($str(.,$comchan($$1,0)),/./g,$comchan( [ $$1 ] , \n ) $chr(32))
|
_________________
 |
|
| Back to top |
|
 |
|