Category:Raws

From Scriptwiki
Revision as of 17:53, 24 November 2005 by Doomie (talk | contribs)

Jump to: navigation, search

Raws

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 (RFC 1459), take a look at http://www.ietf.org/rfc/rfc1459.txt?number=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.

Example

As example, when you join a channel, you get several numeric-raws:

  • 332 - containing the topic of the channel
  • 333 - containing the one who has set the topic and when it was set
  • 353 - containing the names on the channel (similar to /names)
  • 366 - containing the message that the list of names has ended
  • 324 - containing the modes that are currently set
  • 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)