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:
“Acknowledge your will and speak to us all, This alone is what I will to be! Hang your own penal code up above you: we want to be its enforcers!”
—Friedrich Nietzsche (18441900)
“It is hardly to be believed how spiritual reflections when mixed with a little physics can hold peoples attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.”
—G.C. (Georg Christoph)