here is a script i put together from a bit of code that was on the string
(string) mr. collective showed me when i asked about an easy way of changeing the format. I basicly just added the UI stuff so i can give this to ppl who dont realy like to script. Im still learning to write this thingies for mirc and im interested what are the uglies in this one:)
thanx in advance for any input on this
format nicks v1.0
on *:LOAD: {
set %nfprefix <
set %nfsufix >
dialog -mor nickformat nickformat
}
on *:UNLOAD: {
unset %nf*
}
on *:input:*:{
if /* !iswm $$1 && (# || $query($target)) {
echo -ati6 $+(%nfprefix,$nick,%nfsufix) $1-
.msg $ifmatch $1-
haltdef
}
}
on ^*:text:*:*:echo -mbfli6t $iif(#,#,$nick) $+(%nfprefix,$nick,%nfsufix) $strip($1-,mo) | halt
dialog nickformat {
title "nick format"
size -1 -1 95 35
option dbu
edit ">", 2, 55 5 35 10
edit "<", 1, 5 5 35 10, right
text "nick", 3, 43 6 12 9
button "OK", 5, 5 20 25 10, ok
button "Help", 4, 65 20 25 10
button "Cancel", 6, 35 20 25 10, cancel
}
dialog help {
title "Nick Format Help"
size -1 -1 164 114
option dbu
edit "", 1, 2 2 160 110, read multi
}
on *:dialog:nickformat:init:0: {
did -o $dname 1 1 %nfprefix
did -o $dname 2 1 %nfsufix
}
on *:dialog:nickformat:sclick:4: {
dialog -am help help
did -i help 1 1 U can edit the format by either entering the prefix and sufix
did -i help 1 2 in the dialog, or useing the comand:
did -i help 1 3
did -i help 1 4 /nickformat [prefix] [sufix]
did -i help 1 5
did -i help 1 6 If you dont specify any parameters Mirc will open the dialog.
did -i help 1 7
did -i help 1 8 You can also use the 'Nick Format' menu item in the commands
did -i help 1 9 menu of the Mirc menubar.
did -i help 1 10
did -i help 1 11 Usage:
did -i help 1 12 /nickformat ( )
did -i help 1 13 gives: (Nick)
did -i help 1 14 /nickformat 3 5:
did -i help 1 15 gives: Nick: (Nick in color 3 and : in color 5)
did -i help 1 14
}
on *:dialog:nickformat:sclick:5: {
set %nfprefix $did(1)
set %nfsufix $did(2)
}
alias nickformat {
if (!$1) dialog -amo nickformat nickformat | else { set %nfprefix $1 | set %nfsufix $2 }
}
menu menubar {
Nick Format: nickformat