Target (String)
This variable is an important one. It is used for mostly all events. Target is the name used for the current action. As example, in “onKick” event, Target is the kicked user nickname. Another example: in “onQuit” event, Target is the username of the user leaving the room.
Usage:
SendRoom('Hi ' + Target + ' !',true);
MyUserName (String)
This variable is your connected nickname. MyUserName is empty if you are not logged on Camfrog.
Usage:
SendRoom('Hi everyone, my name is ' + MyUserName + ' !',true);
MyRoomName (String)
This variable is the name of the room you are in. MyRoomName is empty if you are not in a room.
Usage:
SendRoom('Hey, welcome in ' + MyRoomName + ' !',true);
MyRoomTopic (String)
This variable is the current topic of the room you are in. MyRoomTopic is empty if you are not in a room, or if no topic is set.
Usage:
SendRoom('Current topic of this room "' + MyRoomTopic + '".',true);
Reason (WideString)
This variable should be used only in “onWarn”, “onKick” and “onPunish” events. This is the reason used for the specified action.
Usage:
SendRoom(Target + ' has been kicked for ' + Reason,true);
Speaker (String)
This variable contains the name of the user speaking. Speaker is empty if nobody talks.
NOTE: Speaker is always low case!
Usage:
if (Speaker<>lowercase(MyUserName)) then begin SendRoom('Hey! Only me is allowed to talk!',true); end;
LastSpeaker (String)
This variable is intended to remain the name of the last blocked user.
NOTE: LastSpeaker is normally low case!
Usage:
if (LastSpeaker<>'') then begin SendRoom('/unblockmic ' + LastSpeaker,true); end;
RoomUsers (TStringList)
This variable contains the user names in the room.
The TStringList type contains several methods and properties
Usage:
RoomUsers.Sort;
SendRoom('Users count = ' + inttostr(RoomUsers.Count),true);
SendRoom('User #1 = ' + RoomUsers[0],true);
if (RoomUsers.IndexOf('friendname')<>-1) then begin SendRoom('friendname is in the room!',true); end;
if ((RoomUsers.Sorted=true) and (RoomUsers.Find('friendname',0)=true)) then //use Find only on sorted list begin SendRoom('friendname is in the room!',true); end;
RoomUsers.CaseSensitive:=false; //to use IndexOf or Find
JoinCount (Integer)
[Added in 6.2] This variables is an important one for the “onJoin” event. Its value tells you if the user is entering the room OR if your virtual user list is enumerating (when you enter the room). For example, when you enter a room, every users already in the room will trigger “onJoin”, but JoinCount will equals the amount of users in room. Once all enumerated, the “onJoin” event will also raise on every user join, then JoinCount will equals zero.
Usage:
if (JoinCount=0) then begin SendRoom('Hello ' + Target + ' !',true); end;

