thats right that $2 is for only one word, but i have test your version with $2- and it doesnt work, he took only the first word:
!news test test1 test2
the topic is set to: news: test and _not_ to test test1 test2
I have no idea why it did not function correctly for you, Unless it was because you were doing them from PM's, (which i only just noticied you included with the ,?)
When a message is sent in PM there is no $chan value so, any attempt to set the topic would have failed, if this is not the cause then i have no idea as i tested the code just now and from a channel message it worked fine.
However this code well work from both if formated correctly
;
;Usage in #channel !queue X
;Usage in PM !queue#channel X
;
on *:text:!queue* *:#,?:{
var %chan = $iif($chan,$chan,$mid($1,7))
set %queue $2
$change.topic(%chan,%news,%queue)
}
;
;Usage in #channel !news X X X
;Usage in PM !news#channel X X X
;
on *:text:!news* *:#,?:{
var %chan = $iif($chan,$chan,$mid($1,6))
set %news $2-
$change.topic(%chan,%news,%queue)
}
alias -l change.topic { if ($me isop $1) { topic $1 news: $2 - queue: $3 } }