mIRC Home    About    Download    Register    News    Help

Print Thread
#237140 15/04/12 02:05 AM
M
medoit
medoit
M
Okay so basically what I want to do is write the host mask of a user into a .txt file so that I can make an invite list from said .txt file. but im not 100% sure how to do it.

C
CtrlAltDel
CtrlAltDel
C
see /help $mask for starters

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
/help /write
/help $address

Basically, you'd end up with:

Code:
/write filename.txt $address($nick,2)


or something similar, depending how much of the address you'd like (/help $mask). You'd then put that line into some event depending on where you'd like it to happen. For example, if you want it to be done when they join, then check /help on join ....

Code:
on *:join:#: { write filename.txt $address($nick,2) }



T
Twitch
Twitch
T
are you trying to make a mass inviter?
eg: join a channel, get all the users of that channel, then invite them to a different channel?

M
medoit
medoit
M
Kind of, basically I have a public channel and a private channel. if someone joins my public channel and their host mask matches that of one on my .txt file, it will add them to my private channel

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Quote:
if someone joins my public channel and their host mask matches that of one on my .txt file, it will add them to my private channel
on *:join:#:{
if ($read(filename.txt,nw,$wildsite)) {
invite $nick #YourPrivateChannel
}

M
medoit
medoit
M
so how about if I wanted the bot to just kick people that were not on the list?

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
on @*:join:#:{
if ($read(filename.txt,nw,$wildsite)) {
invite $nick #YourPrivateChannel
}
else {
kick # $nick Access Denied!
}
}

But you might want to ban the nick's host, as he or she can come back easily upon a kick.

Last edited by Tomao; 16/04/12 12:58 AM.
M
medoit
medoit
M
you sir are my hero...but lets say I only have 1 channel and I want the bot to kick anyone not on the list. Is there a way to tell the bot to do nothing? or would I just have to put some bs command in there like "msg $nick hello"

i think i might have figured it out, but I appreciate all the help. Tyvm guys

Last edited by medoit; 16/04/12 01:10 AM.
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
If you just want to kick if they aren't in your list, just change it to look like this:

Code:
on @*:join:#:{
  if (!$read(filename.txt,nw,$wildsite)) {
    kick # $nick Access Denied!
  }
}


You can replace # in the join line with your channel's name so this doesn't trigger in all channels. And if you want this to also ban the person, you can include that with the kick.


Link Copied to Clipboard