mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2018
Posts: 83
E
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.

Joined: Apr 2018
Posts: 83
E
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.


Link Copied to Clipboard