mIRC Home    About    Download    Register    News    Help

Print Thread
#259317 05/11/16 11:10 AM
Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
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.

BuxXray #259318 05/11/16 02:31 PM
Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
You can use is token.

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


http://scripting.pball.win
My personal site with some scripts I've released.
pball #259322 06/11/16 02:46 AM
Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
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

BuxXray #259326 07/11/16 03:56 AM
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
No you dont.


Dont give a fish - teach to fish!
BuxXray #259330 07/11/16 10:32 AM
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
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))

Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
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


Link Copied to Clipboard