I'm not sure if it's possible to use a raw event (321) to halt or haltdef (prevent default) or even use the ^ event prefix with a raw... Even doing a /raw list to avoid the in-built /list alias brings up the window...
What you can do however, is use a parseline event to re-write the incoming line effectively fooling mIRC into not seeing the server-sent raw event in the first place. I would however advise making some kind of state check like: a variable, remote #group, etc... to enable/disable this functionality if you do wish for the /list command to still be able to pop up.
This will break mIRC's "/list" command so instead of using "/list" instead send it as a "/raw list". It WILL work the first time (with the in-built /list), however since we removed these events mIRC never recognizes the list was successful, and subsequent requests for "/list" will result in an info line in your status:
* /list: listing in progress...
Keep in mind this will also prevent a RAW 321:*: (also 322 and 323) from ever triggering (we effectively expunged this from the inbound queue by replacing it with $null) so you may need to do something else if you're relying on this event to start working with the list data.
Here is a small example script to mimic the functionality making use of the custom signal event and also preventing the channel list window, and echoing into the status window instead using a custom alias named "MyCustomList", also taking advantage of groups to enable/disable this functionality allowing mIRC's regular "/list" to still function.
;== Generic alias name to activate the group event enabling parseline to replace raw 321-323 and trigger a signal.
alias MyCustomList {
.enable #CustomRaw
.raw list
}
#CustomRaw off
on *:PARSELINE:in:*: {
;== Make a variable of the incoming RAW IRC Event line.
var %pl = $parseline
;== UTF-Decode line if applicable
if ($parseutf) { %pl = $utfdecode(%pl) }
;== Test if the line starts with ":<server> 321"
if ($regex(%pl,$+(/^:,$server,\s32[1-3]/))) {
;== Replace the line mIRC's about to process with a blank one
.parseline -itu0 $null
;== Create a signal event called CustomRaw with the data from the event
.signal CustomRaw $gettok(%pl,2-,32)
;== Return to allow mIRC to process this new line
return
}
}
#CustomRaw end
on *:SIGNAL:CustomRaw: {
if ($1 = 321) {
echo -s *** Listing Channels
}
elseif ($1 = 322) {
echo -s $3-
}
elseif ($1 = 323) {
echo -s *** End of /List
;== Disable customraw group so that /list will work.
.disable #CustomRaw
}
}
Command:
/MyCustomList
Output:
*** Listing Channels
#Talon 1 :[+nt]
*** End of /List