Talaysen Posted June 20, 2013 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 161 Reputation: 5 Joined: 02/07/13 Last Seen: March 25, 2016 Share Posted June 20, 2013 With the new channel system, how does one go about making it to where users automatically join a particular channel on login? I'm thinking it'd be nice if people automatically joined the #main, #support, and #trade channels. Quote Link to comment Share on other sites More sharing options...
1 Euphy Posted July 18, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 18, 2013 Both would involve setting and checking a variable upon executing your commands. -If the user leaves the channel, they will not automatically rejoin again, they have to manually rejoin each time. You can set a bit variable via source upon executing "@channel leave <>", or bind the atcommand to a script and set the variable that way. or -an @command that will disable autojoining channels for that user. Much easier. Bind an atcommand that sets the variable. - script #chan_control -1,{ OnInit: bindatcmd("channeljoin",strnpcinfo(0)+"::OnChannelJoin"); end; OnChannelJoin: set channel_join_off, !channel_join_off; message strcharinfo(0),"Channel auto-join is now "+((channel_join_off)?"disabled":"enabled")+"."; end; OnPCLoginEvent: if (!channel_join_off) { atcommand "@join #main"; atcommand "@join #support"; atcommand "@join #trade"; } end; } 2 1 Quote Link to comment Share on other sites More sharing options...
0 Talaysen Posted July 18, 2013 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 161 Reputation: 5 Joined: 02/07/13 Last Seen: March 25, 2016 Author Share Posted July 18, 2013 - script autojoin -,{ OnPCLoginEvent: atcommand "@join #main"; atcommand "@join #support"; atcommand "@join #trade"; end; } I'm currently using the above code. How can I make it to where either: Could anyone point me in the direction of either: -If the user leaves the channel, they will not automatically rejoin again, they have to manually rejoin each time. or -an @command that will disable autojoining channels for that user. Quote Link to comment Share on other sites More sharing options...
Jaburak Posted June 20, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted June 20, 2013 - script autojoin -,{ OnPCLoginEvent: atcommand strcharinfo(0) + "join #main"; atcommand strcharinfo(0) + "join #support"; atcommand strcharinfo(0) + "join #trade"; end; } 1 Quote Link to comment Share on other sites More sharing options...
Talaysen Posted June 20, 2013 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 161 Reputation: 5 Joined: 02/07/13 Last Seen: March 25, 2016 Author Share Posted June 20, 2013 Thanks Anakid! Quote Link to comment Share on other sites More sharing options...
Talaysen Posted July 18, 2013 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 161 Reputation: 5 Joined: 02/07/13 Last Seen: March 25, 2016 Author Share Posted July 18, 2013 That worked perfectly. Does exactly what it says on the tin. Thanks so much! Quote Link to comment Share on other sites More sharing options...
Question
Talaysen
With the new channel system, how does one go about making it to where users automatically join a particular channel on login? I'm thinking it'd be nice if people automatically joined the #main, #support, and #trade channels.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.