mIRC Home    About    Download    Register    News    Help

Print Thread
N
Nekomusume
Nekomusume
N
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.

B
Boogyman
Boogyman
B
on ^*:Text:*:#:/echo # blabla | haltdef }
not sure about the msg thing , but it would look like this ::
on ^*:msg:*:#:/echo $nick blabla | haltdef

L
LocutusofBorg
LocutusofBorg
L
Not sure what you mean with "either kind of chat window",, but there is always $target

H
Hammer
Hammer
H
echo $color(normal) -mbflirt $iif(#* iswm $target,$chan,$nick) .»{ $+ $nick $+ }«. $1-

M
MrPeepers
MrPeepers
M
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

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
I use $iif(#,#,$nick) because it's shorter but also because there are other types of channels apart from #channels.

H
Hammer
Hammer
H
$iif($window($target).type == channel,$chan,$nick)

N
Nekomusume
Nekomusume
N
i'll have to try some of these out. thnx.

N
Nekomusume
Nekomusume
N
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.

H
Hammer
Hammer
H
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.


Link Copied to Clipboard