mIRC Home    About    Download    Register    News    Help

Print Thread
#244812 30/03/14 02:50 PM
Joined: Mar 2014
Posts: 18
D
DvD_cD Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2014
Posts: 18
I want to check the command user is in the file!


Code:
on *:TEXT:!buyvip:#: {
  if ($nick <? ISIN ?> $read(vip.txt)) {
    msg $chan You're already VIP user!
  }
  else {
    msg $chan You're now vip :)
  }
}

Last edited by DvD_cD; 30/03/14 02:51 PM.
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On *:TEXT:!buyvip:#: {
  if ($read(vip.txt,nw,$nick)) { msg # You're already VIP user $+($nick,!) }
  else { 
    write vip.txt $nick
    msg # You're now vip $nick :)
  }
}

Joined: Mar 2014
Posts: 18
D
DvD_cD Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2014
Posts: 18
Originally Posted By: SladeKraven
Code:
On *:TEXT:!buyvip:#: {
  if ($read(vip.txt,nw,$nick)) { msg # You're already VIP user $+($nick,!) }
  else { 
    write vip.txt $nick
    msg # You're now vip $nick :)
  }
}


10x smile !
Can you tell me what happend here:
<vip.txt,nw,$nick> ? What is nw?

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sure that means you're searching vip.txt for a wildcard match with the exact username.

If you have 2 users join with similiar nicks ie:

Slade
SladeKraven

And they both join it'll act as 2 seperate nicknames, as it should.

Joined: Mar 2014
Posts: 18
D
DvD_cD Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2014
Posts: 18
One more laugh

Code:
 on *:TEXT:*:#: {
  if ($read(vip.txt,nw,$nick)) {
???
  } 
 else { return }
}


This is VIP chat only. But don't know command for just continue the msg from the user :?

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I'm not too sure what you're actually asking man.

Joined: Mar 2014
Posts: 18
D
DvD_cD Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2014
Posts: 18
Code:
 on *:TEXT:*:#: {
  if ($read(vip.txt,nw,$nick)) {
???
  } 
 else { return }
}


When someone type in chat, bot check the vip.txt. If the user is in the file then don't do noting (just post the msg).
If the user is not in the list, don't type the msg.
Like that:
[ Dvd1 is vip. ]
[ Dvd2 is not. ]
Dvd1: apple
> Bot check, (dvd1 is vip) and in the chat:
Dvd1: apple
Dvd2: orange
> Bot check, (dvd2 is not vip) and in the chat:
Nothing.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Right so if the user is in the list then you want the bot to message the channel with the vip's message? And if they arent on the list the bot doesnt repeat it?

Joined: Mar 2014
Posts: 18
D
DvD_cD Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Mar 2014
Posts: 18
If you're in the list, and you type your message appears in the chat, BUT not from the bot (Bot: Dvd1: blahblah).
Just if you type and you're in the list your message is normal.


Link Copied to Clipboard