Code:
Halting text

mIRC displays its own default text for various types of IRC Server events, such as users joining or parting a channel, however you can modify or suppress this by using a script

The ^ event prefix

You can prevent the default text for an event from being shown by using the ^ prefix in an event definition. This allows you to show your own custom event messages.

on ^1:JOIN:#:echo $chan Joins: $nick | halt

 

This line is triggered by a JOIN event and shows your own custom join event message, /halt prevents the normal message from being shown.

 

The ^ events do not replace your existing events; your normal events are independent and are still processed whether there is a ^ event in a script or not.

 

If you only want to halt the default text without /halting the entire script, you can use the /haltdef command.

 

You can check if a script has already halted the default text by using the $halted identifier; it returns $true if a user has used /halt or /haltdef in a ^ event, and $false if not.

 

The ^ event prefix currently works only on the following types of events: ACTION, BAN, CHAT, DEHELP, DEOP, DEVOICE, HELP, INVITE, JOIN, KICK, MODE, NICK, NOTICE, OP, OPEN, PART, PING, TEXT, UNBAN, USERMODE, VOICE, QUIT, SERV, SERVERMODE, SERVEROP, SNOTICE, TABCOMP, TOPIC, WALLOPS.

 

Note: Halting the default text for an event affects how mIRC displays the most basic information about IRC events to a user, so it should be used carefully.




I still confusing,
can you give some example?

ex: all users will whisper my bot "!topkills"
/w STATS !topkills
my script like this
Code:
on *:TEXT:!topkills*:*: {
  var %sql = SELECT `player`,`kills` FROM `stats` ORDER BY `kills` DESC LIMIT 0 , 10
  var %res = $mysql_query(%con.db, %sql)
  msg $nick Top Kills
  msg $nick =========
  var %i 1
  while ($mysql_fetch_row(%res, topkills)) {
    msg $nick %i $+ . $hget(topkills, player) = $hget(topkills, kills)
    inc %i
  }
  mysql_free %res
}



Last edited by DotaBattle; 08/02/14 04:20 PM.