Category:Raws

From Scriptwiki
Jump to: navigation, search

When the IRC server send you information it contains either a command or a RAW numeric. The numerics are a supplement to the normal events (NOTICE/PRIVMSG/MODE/etc.) not a replacement. Because raw events receive the information from the server in its native form, they give you maximum flexibility in regards to how you choose to use it or present it to the user of your script.


To read more about the IRC RFC, look here: RFC 1459

Syntax

To actually react on numeric-raws, you have to use:

raw [$]<numeric>:<matchtext>:{ commands }

Note that raw-events are just like "normal" events, like On Text or On Notice. That means that you can't use them in an alias or in another event. If you are using $ infront of the numeric, you have to use a regex-based matchtext.

Example

For example you get several numeric raws when you join a channel:

  • 332 - containing the topic of the channel (like when using /topic)
  • 333 - containing the one who has set the topic and when it was set
  • 353 - containing the names on the channel (like when using /names)
  • 366 - containing the message that the list of names has ended
  • 324 - containing the modes that are currently set (like when using /mode)
  • 329 - containing the creation date of the channel

If you e.g. want to echo the creation date of the channel to your status window, you would have to use:

; raw 329 returns: <yournick> <#channel> <creation time in unix format>
raw 329:*: {
 echo -a $2 was created at: $asctime($3)
}


If you want to halt mIRC's default output in connection with a raw-event, you can use /haltdef. For example:

raw 332:*: {
 haltdef
}

This example would make mIRC not show the topic of a channel you have joined.

Subcategories

This category has the following 53 subcategories, out of 53 total.

R

Pages in category "Raws"

The following 200 pages are in this category, out of 206 total.

(previous page) (next page)

R

(previous page) (next page)