on ^*:text:*:#: {
if (($exists(spaces.dll)) && ($dll(spaces.dll, loaded, ) == 1)) {
; the following line splits $rawmsg (which still includes all spaces)
; on the first occurance of the string " :" - after which the message
; will be. Before which is the source, target, etc.
; I can't split on the second ":" because IPv6 addresses that don't rev-DNS have lots of :s.
var %msg = $mid($rawmsg,$calc($pos($rawmsg,$+($chr(32),:),1)+2),2048)
$dll(spaces.dll, echo, $color(normal) -m $chan $timestamp $+(,$nick($chan,$nick).color,<,,$iif($left($nick($chan,$nick).pnick,1) isin ~&@%!+,$v1),$chr(32),$nick,,$nick($chan,$nick).color,>,) %msg)
}
else {
echo $color(normal) -m $chan $timestamp $+(,$nick($chan,$nick).color,<,,$iif($left($nick($chan,$nick).pnick,1) isin ~&@%!+,$v1),$chr(32),$nick,,$nick($chan,$nick).color,>,) $1-
}
haltdef
}
on *:INPUT:#:{
if ((/* iswm $1) && (!$ctrlenter)) { return }
if (($exists(spaces.dll)) && ($dll(spaces.dll, loaded, ) == 1)) {
var %input = $dll(spaces.dll, input, )
$dll(spaces.dll, send, PRIVMSG $target : $+ %input)
$dll(spaces.dll, echo, -m $chan $timestamp $+(,$nick($chan,$me).color,<,,$iif($left($nick($chan,$me).pnick,1) isin ~&@%!+,$v1),$chr(32),$nick,,$nick($chan,$me).color,>,) %input)
}
else {
PRIVMSG $target $1-
echo -m $chan $timestamp $+(,$nick($chan,$me).color,<,,$iif($left($nick($chan,$me).pnick,1) isin ~&@%!+,$v1),$chr(32),$nick,,$nick($chan,$me).color,>,) $1-
}
haltdef
}