mIRC Home    About    Download    Register    News    Help

Print Thread
Help with nicks #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.

Re: Help with nicks [Re: BuxXray] #259318 05/11/16 02:31 PM
Joined: Nov 2009
Posts: 295
P
pball Offline
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.
Re: Help with nicks [Re: 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

Re: Help with nicks [Re: BuxXray] #259326 07/11/16 03:56 AM
Joined: May 2015
Posts: 249
splinny Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
No you dont.


Dont give a fish - teach to fish!
Re: Help with nicks [Re: BuxXray] #259330 07/11/16 10:32 AM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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))

Re: Help with nicks [Re: ruprecht] #259331 07/11/16 10:35 AM
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.

http://forums.mirc.com/ubbthreads.php/topics/259329/Script_that_don't_work_in_a_ce#Post259329