Author Topic: Alias IF  (Read 3489 times)


  • Guest
Alias IF
« on: May 15, 2004, 08:09:56 AM »
Ok, this is probably simple, but I've looked through

and am still stuck.

I want an alias that will randomly select 1 of 3 responses

I want



To do either:

/msg $channel Hi, $1
/msg $channel Hey, $1


/msg $channel Welcome,


What would be the best way to do this :) ?

Thanks :)


  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Alias IF
« Reply #1 on: May 15, 2004, 10:34:52 AM »
There is a script function called Aliases that checks for

additional aliases that can be used inside scripting. You make Aliases = TRUE when you have a match, so that IceChat no

longer looks for the command elsewhere.

Add this to an existing script file in the script editor, or create a new


----------start here--------------------------------


Select Case Command
   Case "/hi"
     ALIASES=True 'we have a

     'here are the 3 random messages
     MyResponses = Array("Hi, " & Parameters, "Hey, " & Parameters,

"Welcome, " & Parameters)
     'pick a random response
     msg=int(UBound(MyResponses) *

     'send the message to the current channel
     SendCommand "//msg $channel " & MyResponses(msg)


End Select

End Function
----------end here--------------------------------

If you wish

to add a command to the nicklist popup, you can add this command to the menu editor:

.Say Hello:/hi

The IceChat God