Author Topic: Identifiers in Scripts  (Read 3450 times)


  • Guest
Identifiers in Scripts
« on: August 26, 2006, 10:10:17 PM »
I was a little confused with this.  I cant seem to get an identifier to work in it. my code:

Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)

if len(message) > 9 then
  if left(Message,8) = "!popcorn" then

Name = GetIdentifier("$1",ServerNumber)

SendCommand "/describe " & Channel & " gives " & Name & " a bag of buttery popcorn.", ServerNumber
  end if
end if

End Sub

basically i want it to do this:

<person> !popcorn person2
* UDHelp gives person2 a bag of buttery popcorn.

Any help? Thanks.


  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Identifiers in Scripts
« Reply #1 on: August 26, 2006, 10:39:21 PM »
You would not use identifiers for that.
The message is in the "Message" variable , so if the message was !popcorn person2, then the Message variable would contain that.
So ten you would use Instr and Mid to split the Message up and go from there. No need to use Getidentifier in this case.
The IceChat God