R4nk3d is a scripting noob. :P

We run a gaming server. Basically everything that is said from inside the game is echoed into an IRC channel. The ingame players aren't actually in the channel - there's one bot that echos everything, e.g.:

Quote:

(01:43) · [KUMB] · Aaron_butche(1) - Hi!
(01:43) · [KUMB] · Scion(4) - Hello smile
(01:43) · [KUMB] · Joe_Dean(3) - Welcome!!


The %nick var is used to extract the actual name from the (*) (this is the players ID ingame). We don't want to include their ID's, so the %nick var gets everything until it hits the first occurrence of '(', then stops there.

Now, if %nick is also inside the IRC channel and not just ingame, I want the script to allow use of the script by this user.

-----------------------------------

So if a player ingame types !blah, the script must check to see if that name is also in the IRC channel (by using: if (%nick ison $chan) {

This isn't added into the script that R4nk3d linked, but the plan is to restrict the use of the script to voiced users. So:

Quote:
if (%nick ison $chan) && (%nick isvoice $chan) {


But that's just the next step of the script - I need to know first how to use vars in an IF statement.

Last edited by Joe_Dean; 04/05/08 06:06 AM.