Code Examples
The code below is in the remote scripts format. If placed into an alias file, the command names should not be preceded by the word "alias". Test Comments include the common /* comment */ and ;comment.
Here is an example of a Hello World alias:
;Defines the alias 'hello' in the remote script ;Note: if this is placed in an alias script, ;the 'alias' part must be removed (result: hello {) ;Usage: /hello alias hello { ;Displays(/echo) 'Hello World!' into the active window(-a) echo -a Hello World! }A remote script to automatically respond to certain text
;Placed in a remote script ;When a user types Hello! in a channel, ;you answer back: Hello, ! on *:TEXT:Hello!:#:{ msg $chan Hello, $nick $+ ! } ;When a user types Hello! in a private message, ;you answer back: Hello, ! on *:TEXT:Hello!:?: { msg $nick Hello, $nick $+ ! } ;Here is a script which automatically give's voice to a user ;who joins a particular channel(The Bot or user should have HOP) on *:JOIN:#?: { mode $chan +v $nick } ;A bad word script on *:Text:die*:#: { .mode $chan +b $nick | .kick $chan $nick dont say that, }Read more about this topic: MIRC Scripting Language
Famous quotes containing the words code and/or examples:
“Wise Draco comes, deep in the midnight roll
Of black artillery; he comes, though late;
In code corroborating Calvins creed
And cynic tyrannies of honest kings;
He comes, nor parlies; and the Town, redeemed,
Gives thanks devout; nor, being thankful, heeds
The grimy slur on the Republics faith implied,
Which holds that Man is naturally good,
Andmoreis Natures Roman, never to be
scourged.”
—Herman Melville (18191891)
“In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.”
—Michel de Montaigne (15331592)