• Welcome to Vice City Multiplayer.
 

IRC Problem

Started by Amenine, March 09, 2009, 01:10:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Amenine

Can someone help me through out the Irc ...
Like:
on *:JOIN:*:{
on *:Quit

And other actions and alll means i need all like in GUS
In Gus there are signals according to which script works..i too want that like JOIN and Quit if there are any...

Thanks
Amenine

thijn

U mean the IRC Signals?

If so, maby this helps:


TEXT events

You can react to text, either specific words / phrases, or to text from specific users / nicks. You can react differently to those words in ACTION text or Notice text, Channel text or Private Message text.
on 1:TEXT:<text to match>:<location type>:<command>

The text to match can be an exact phrase:
on 1:TEXT:hello $me :<location type>:<command>

or a word or phrase in the text:
on 1:TEXT:*help*:<location type>:<command>

or any text at all using a * wildcard:
on 1:TEXT:*:<location type>:<command>

The location type can be a channel (#):
on 1:TEXT:*:#:<command>

one or more specific channels:
on 1:TEXT:*:#mIRC,#beginners:<command>

a query window (using '?'):
on 1:TEXT:*:?:<command>

or in all normal or private text (use *):
on 1:TEXT:*:*:<command>

The following examples should help you to understand exactly how the formatting of a TEXT event works. Note that the following examples use commands that you should be familiar with from the Commands tutorial.
on !1:TEXT:*help*:#:/msg $chan Do you need some help $nick $+ ?

The above event looks at all text in any channel (from a level 1 user that is not the user of this script) for the word 'help' and if it finds it, sends a message to channel asking the person who triggered the event if they need help.
on *:TEXT:*hello*:?:/msg $nick Hello $nick

The above event will trigger when anyone says 'hello' somewhere in the text of a private message or query and will send a private message 'hello' in return.


NOTICE and ACTION events

The on ACTION and on NOTICE events use exactly the same format as on TEXT, and trigger on an action and on a notice event respectively.
on !1:ACTION:*waves*:#:/describe $chan waves cheerfully back at $nick
on !1:NOTICE:*:#:/echo -a Notice from $nick ( $chan ) $1-

The above events respond to an Action and a Notice message respectively. The $1- identifier used in the Notice example contains the entire text content of the notice.

The /describe command is identical to the /me or /action command, but allows you to give a location of which window to send the Action to. The $chan identifier gives the location as the same channel where the notice that triggered the event came from.


JOIN and PART events

The Join / Part events are triggered when a user of the level specified joins or parts (leaves) a channel you are in. Unless otherwise set, this includes your own joining and parting of channels.
on !1:JOIN:#:/msg $chan Welcome to $chan $nick

The above example will trigger when any default level user (except yourself) joins any channel, and will welcome them. Note that the /say command cannot be used in an events script since it cannot specify where to send the text. The /message <channel / nick> works exactly as /say however.
on Friend:PART:#mIRC:/msg $nick See ya soon!

This one triggers when a user with level 'Friend' parts from the channel #mIRC when you are there. It sends a private message saying 'See ya soon' to them.


CHAT events
on 1:CHAT:*hello*:/msg =$nick Hello there!

The on CHAT event is similar to the TEXT events. The above example triggers when a level 1 or above user says 'hello' in a DCC Chat. The equal sign in =$nick is required to send the reply as a dcc chat message. If no equal sign is used, the message is sent as a private message.


OPEN and CLOSE events

on <level>:<OPEN or CLOSE>:<window type>:<command>

Window types are like the '?' for Private messages and '#' for channels that we have used already in some of the earlier examples.

# means a Channel Window
? means a Private Message or Query Window
= means a DCC Chat Window
* means any window type
! means a File Server Window
@ means a Custom Window

You can't use OPEN or CLOSE events in relation to channel windows however. You must use JOIN and PART events instead.
on ^1:OPEN:?:halt
on 2:OPEN:?:msg $nick Hi, be right with you $nick

The above open event is an example of a ^ prefix event, which allows you to halt events. In this example, if the incoming message is from a level 1 user the query window is prevented from opening by using the /halt command. A level 2 or higher user would be subject to the second event script instead.

MIRC Events always try to use the highest applicable level for reacting to any event you have set.
on 1:OPEN:=:/msg =$nick Hi! I'll be with you in a second...

This triggers when a dcc chat connection is first established. The equal sign in =$nick is required to send the reply as a dcc chat message.
on 1:CLOSE:?:/echo -s you just closed $target query window

This event triggers when you close any Query window, it displays the 'echo' to the status window. In case this seems rather pointless, remember that because logging can be applied to only specific windows, you could choose to log your status window only, and keep track of all major events there where it would be copied into the log - an activity log kind of arrangement.


Other Events

There are many more events yet but all follow the same basic principles as those above.
on *:CONNECT:
on *:DISCONNECT:
on 1:OP:<Channel*>:echo -s $nick gave ops to $opnick
on 1:DNS:
on 1:FILESENT:<file (e.g. *.txt)>:echo $filename sent to $nick
on 1:FILERCVD:<file (e.g. *.wav)>:echo $filename received from $nick
on 1:GETFAIL:<file (e.g. *.mid)>:echo Failed to receive $filename
on 1:SENDFAIL:<file (e.g. *.zip)>:echo Failed to send $filename
on 1:INPUT:#mIRC:/echo You entered the text " $1- " in the #mIRC window

For the full list of events and more tips on their use read the help in mIRC on the subject of 'Remotes'.





Amenine

Big Thanks to Thijn.. :D

Regards
Amenine

thijn