Jump to content

[req] Code


Me Hotur Not

Recommended Posts

Hello, im just wondering if it's not too much to ask?

 

Im making a bot at the moment, and i need to know how to do somthing?

 

I have a list of members in a .txt document. I want my bot (mIRC) to check the list of members for when a member joins, and if the member is in the list, to voice them, and if they are not kick them.

 

Is this possible?

Link to comment
Share on other sites

  • 1 month later...

When reading from a text file you need to use a special code to do that with. I've noticed that simply having...

 

if ($nick isin $read(sometext.txt))...
or
if (* $+ $nick $+ * iswm $read(sometext.txt))

 

won't work most of the time. So, try this code...

 

on *:JOIN:#: {
  if ($read(File.txt,w,* $+ $nick $+ *)) mode $chan +v $nick
  else {
    mode $chan +b $ial($nick).addr 5
    kick $chan $nick Sorry $nick $+ , but you aren't on my list.
  }
}

Edited by Warrior124
Link to comment
Share on other sites

Guest Travis

%allowednicks = nick1,nick2,nick3,nick4,nick5

if ($istok(%allowednicks,$nick,44)) mode $chan +v $nick

 

 

hadd -m team $nick $chan

if ($hget(team,$nick)) mode $chan +v $nick

 

I prefer these methods.

Link to comment
Share on other sites

if ($nick isin $read(sometext.txt))

I actually never got this to work. I also have noot had the patience to write for mIRC the past few months because it just got to be alot of work and no way to show the end result for me.

 

Warriors code worked the best, and it was the only one that actually had the +b too kick and ban the unwanted chatter from the room. It's an easy mod to add a +k instead of the +b to just do a simple kick. It does not seem too nice to ban a chatter from a room if they just happen by. If they are just looking to chat the simple kick will do and they will get the message.

 

<shruggs> :whistle:

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...