mIRC Homepage
Posted By: Nekomusume problem using on text w/ chat windows - 23/08/03 08:14 PM
ive got an on text script that i use to change the way mIRC displays normal channel dialogue.

the problem is that i can't figure out how to determine whether a given line of text is coming from either kind of chat window, or how to direct the .msg and .echo to the chat window in question properly...

any suggestions appreciated.
Posted By: Boogyman Re: problem using on text w/ chat windows - 23/08/03 08:34 PM
on ^*:Text:*:#:/echo # blabla | haltdef }
not sure about the msg thing , but it would look like this ::
on ^*:msg:*:#:/echo $nick blabla | haltdef
Not sure what you mean with "either kind of chat window",, but there is always $target
Posted By: Hammer Re: problem using on text w/ chat windows - 24/08/03 09:04 AM
echo $color(normal) -mbflirt $iif(#* iswm $target,$chan,$nick) .»{ $+ $nick $+ }«. $1-
Posted By: MrPeepers Re: problem using on text w/ chat windows - 24/08/03 09:04 AM
on ^*:TEXT:*:#:{
echo $chan ( $+ $asctime($ctime,HH:nn:ss tt) $+ ) ( $+ $iif($left($nick(#,$nick).pnick,1) isin $prefix,$ifmatch) $+ $nick $+ ) $1-
haltdef
}
on *:INPUT:#:{
if ($left($1-,1) != /) {
.msg # $1-
echo $chan ( $+ $asctime(HH:nn:ss tt) $+ ) ( $+ $iif($left($nick(#,$me).pnick,1) isin $prefix,$ifmatch) $+ $me $+ ) $1-
halt
}
}
on ^*:ACTION:*:#:{
echo $chan ( $+ $asctime($ctime,HH:nn:ss tt) $+ ) ( $+ $iif($left($nick(#,$nick).pnick,1) isin $prefix,$ifmatch) $+ $nick $+ ) $1-
haltdef
}
I use that personaly to change the look when messages are deleiverd and I send them
Posted By: qwerty Re: problem using on text w/ chat windows - 24/08/03 10:13 AM
I use $iif(#,#,$nick) because it's shorter but also because there are other types of channels apart from #channels.
Posted By: Hammer Re: problem using on text w/ chat windows - 24/08/03 10:24 AM
$iif($window($target).type == channel,$chan,$nick)
Posted By: Nekomusume Re: problem using on text w/ chat windows - 24/08/03 06:24 PM
i'll have to try some of these out. thnx.
Posted By: Nekomusume Re: problem using on text w/ chat windows - 24/08/03 09:27 PM
looking at these abit more, i've noticed that they are really geared to the channel windows, as opposed to those windows generated by /query /msg and the DCC Chat...

after a mess of experimention, and the addition of $target to my repetoire, i've come up with this:

on ^*:text:*:*: {
if ( $1 == !list ) { halt }
if ( $1 == @find ) { halt }
if ( $target == $me ) { echo 14 $nick 0  $+ $cnick($nick).color $+ $nick 14- 9 $$1- }
echo 14 $target 0  $+ $cnick($nick).color $+ $nick 14- 9 $$1-
haltdef
}

the if ( $target == $me) line causes the echo to be directed to query windows (as they have the same name as the nick of the person you are talking to)...

irritatingly, now that i've experimented w/ DCC chat windows, i've discovered that the bloody things don't seem to activate on text triggers at all. on input works perfectly though.
Posted By: Hammer Re: problem using on text w/ chat windows - 25/08/03 10:24 AM
Perhaps this will help clear things up for you:
  • on TEXT is only for query or channel text, as are both on NOTICE and on ACTION.
  • on CHAT is for DCC Chat sessions.
  • on SERV is for fserve sessions.
  • on SNOTICE is exactly the same as on NOTICE with the exception that $nick is a server.
  • on WALLOPS is basically the same as on SNOTICE, except that it is sent to everyone on the network from an oper nick.
on SNOTICE and on WALLOPS require usermodes to be explicitly set in order for you to receive them.
© mIRC Discussion Forums