mIRC Homepage
Posted By: BuxXray Help with nicks - 05/11/16 11:10 AM
Is it possible to put many usernames in this line

Code:
if ($nick == Username) {


For example:
Code:
if ($nick == Username1, username2, username3) {


If not, How can I put more names other than auser 100:TEXT:#: {

Thanks! You gets what is my point right? Sorry for grammar.
Posted By: pball Re: Help with nicks - 05/11/16 02:31 PM
You can use is token.

if ($istok(nick1 nick2 nicketc,$nick,32)) {
Posted By: BuxXray Re: Help with nicks - 06/11/16 02:46 AM
Originally Posted By: pball
You can use is token.

if ($istok(nick1 nick2 nicketc,$nick,32)) {

Do I need to use commas or nah?

I mean
Code:
if ($istok(John, Bob, Jack,$nick32))?

I don't get why you only used comma in nicketc part and $nick,32

Thanks
Posted By: splinny Re: Help with nicks - 07/11/16 03:56 AM
No you dont.
Posted By: ruprecht Re: Help with nicks - 07/11/16 10:32 AM
Originally Posted By: BuxXray
Originally Posted By: pball
You can use is token.

if ($istok(nick1 nick2 nicketc,$nick,32)) {

Do I need to use commas or nah?

I mean
Code:
if ($istok(John, Bob, Jack,$nick32))?

I don't get why you only used comma in nicketc part and $nick,32

Thanks


The $istok identifier has 3 arguments, which are separated by commas. Everything before the 1st comma is the text to check. The item between the commas is the text to find. The item after the 2nd comma is the ASCII code of the delimiter of the tokens in the 1st part. In this example 32, or a space. The delimiter can be any valid unique character. Using a comma in a literal string will cause an error, as the identifier doesn't know what to do with more than 2. You can use commas in a variable if you really want to:

Code:
var %toks = User1,User2,User3,UserN
if ($istok(%toks,$nick,44))


This will also work...
Code:
if ($istok(User1*User2*User3*UserN,$nick,42))
Posted By: BuxXray Re: Help with nicks - 07/11/16 10:35 AM
Thanks for everything!
perhaps you guys know the solution about my another problem.
Sorry about it.

Link: Script that don't work in a certain channel.

https://forums.mirc.com/ubbthreads.php/topics/259329/Script_that_don't_work_in_a_ce#Post259329
© mIRC Discussion Forums