mIRC Home    About    Download    Register    News    Help

Print Thread
Is it poss to variablise channel names in ON Join #264972 06/02/19 11:10 AM
Joined: Apr 2018
Posts: 83
E
Erasimus Offline OP
Babel fish
OP Offline
Babel fish
E
Joined: Apr 2018
Posts: 83
Got a situation using an On Join section of code for an IdleRPG game. There is a possibilty of a 2nd separate game being added to the site.

I recoded to allow for this with
Code:
On *:JOIN:#idleRPG, #NewChannel:{
..
if (($nick == IdleBot)
..
if (($nick == NewBot)

These are used to detect the bot rejoining the channel (after a maintenance shut dow etc.) so that the user can be automatically re-logged in.

NewBot and #NewChannel are placeholders. Neither exists as of yet, and are there to allow Global find and replace with actual names, once they are created.

Question: is it possible to use variables or a single token list (CSV) in place of the actual channel names ?
as in
Code:
*:JOIN:%Game1, %Game2:{

If so then I can use global variables to hold the channel names etc. and amend an existing dialog to allow the new items to be entered there, rather than by code changes.

In other words, no need for a newer version to be issued.

Re: Is it poss to variablise channel names in ON Join [Re: Erasimus] #264974 06/02/19 11:27 AM
Joined: Apr 2018
Posts: 83
E
Erasimus Offline OP
Babel fish
OP Offline
Babel fish
E
Joined: Apr 2018
Posts: 83
Cancel this, the help info shows hard coded channel names for both on join and /join, but I am already using /join %channeltobejoined type of thing.

I therefore assume that variables will also work on the On Join.

Sorry for the question. Brain finally kicked into gear 10 mins after posting the question.