Skip to content
General IRCd

[req] Code

A TG007 community discussion started by Me Hotur Not.

Discussion 8 posts
Page 1 of 1
Open
Topic #8565 · 8 published posts · 2,239 views

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?

on *:JOIN:#:{ 
if ($nick != $me)
if ($nick isin $read(document.txt)) { 
mode # +v $nick
}
}

 

I see what your saying but does that mean no new members can join your room??

A fine is a tax for doing wrong. A tax is a fine for doing well.

yes, because only our clan can join the channel.

again, no need for "if ($nick != $mnick) {"

 

on *!@:JOIN:#:{ if ($nick iswm $read(File.txt)) { .raw mode # +v $nick } }

 

:)

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 Jul 15, 2007 1:02 PM by Warrior124

%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.

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: