mIRC Home    About    Download    Register    News    Help

Print Thread
#244812 30/03/14 02:50 PM
D
DvD_cD
DvD_cD
D
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.
#244813 30/03/14 03:24 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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 :)
  }
}

D
DvD_cD
DvD_cD
D
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?

#244817 30/03/14 07:49 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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.

D
DvD_cD
DvD_cD
D
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 :?

#244821 31/03/14 09:57 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I'm not too sure what you're actually asking man.

D
DvD_cD
DvD_cD
D
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.

#244823 31/03/14 10:20 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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?

D
DvD_cD
DvD_cD
D
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