Getting topic and saving it to %var - 24/07/06 08:47 PM
I'd like to get channel's topic, remove the first word / a specified part of text / some first letters of it and save it to %var after that. How do I do that?
alias Get-Topic { set %channel-topic $chan($active).topic echo -s Topic is %channel-topic }
; ;usage $new.topic.string(<channel>,<?|-|+|N>) ; alias new.topic.string { if ($chan($1) == $1) { if (TTG:* * iswm $chan($1).topic) { var %num = $mid($gettok($chan($1).topic),1,32),5) if ($2 == ?) { return %num } if ($2 == -) { dec %num } if ($2 == +) { inc %num } if ($2 isnum) { var %num = $2 } return $+(TTG:,%num $gettok($chan($1).topic),2-,32)) } } }