egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

kick script [Solved]
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 8:47 pm    Post subject: Reply with quote

Wow... thanks a bunch. This is what I have been looking for. Would it be possible to allow others to add to the list, without having to edit the script? Like !add nick ? anyways this works for me Very Happy
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 8:56 pm    Post subject: Reply with quote

Yeah that can be done, but you would have to make a file on the shell to add or delete nicknames and store them in it. It would be a bit more complicated as each nick would be to have an entry on a channel.

Something like: "nick:#chan" can be stored for each entry.

I am currently busy at the moment. Goodluck, hope someone else can do the rest for you, heh. Razz

I did make a script of a similar sort recently, which utilizes the same exact database structure, but its for adding/deleting auto-voice users from a channel. Maybe you can have a look at it and try to work on it yourself:

Here is the link:
http://channels.dal.net/awyeah/scripts/voiceserv.tcl
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 8:58 pm    Post subject: Reply with quote

Cool. I will take a look at it. Thanks again for your help.

Nice looking script. In fact that is how I need to add nicks to the allow list, with different levels of access. Maybe I can figure out how to replace a few things and make it work.. then again maybe not. Laughing
Back to top
View user's profile Send private message
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 9:27 pm    Post subject: Reply with quote

hmm.. the bot is banning nicks in the list.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 10:20 pm    Post subject: Reply with quote

The code seems perfectly OK, not sure why that is happening. Try this:

Code:

#Set channels you want this script to work on
set nicksnotallowed(chans) "#chan1 #chan2 #chan3"

#Set the nicks you want to allow in the channel seperated in a
#new line withing quotations marks. This is not case sensitive.
set nicksnotallowed(nicks) {
"nick1"
"nick2"
"nick3"
}

bind join - "*" nicks:not:allowed

proc nicks:not:allowed {nick uhost hand chan} {
 global nicksnotallowed
 if {[isbotnick $nick] || ![botisop $chan]} {return 0}
 if {[lsearch -exact [split [string tolower $nicksnotallowed(chans)]] [string tolower $chan]] == -1} {return 0}
 if {[lsearch -exact [split [string tolower $nicksnotallowed(nicks)]] [string tolower $nick]] == -1} {
   putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
   putserv "KICK $chan $nick: Your nick is not allowed on this channel"
  } else {
   return 0
  }
}

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 10:29 pm    Post subject: Reply with quote

still banning users in the list. dunno.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 10:36 pm    Post subject: Reply with quote

Replace these lines:

Code:

 if {[lsearch -exact [split [string tolower $nicksnotallowed(nicks)]] [string tolower $nick]] == -1} {
   putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
   putserv "KICK $chan $nick: Your nick is not allowed on this channel"
  } else {
   return 0
  }
}


with these and then try:

Code:

 if {[lsearch -exact [split [string tolower $nicksnotallowed(nicks)]] [string tolower $nick]] != -1} {return 0}
  putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
  putserv "KICK $chan $nick: Your nick is not allowed on this channel"
  return 0
}

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 10:44 pm    Post subject: Reply with quote

same thing..
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 10:50 pm    Post subject: Reply with quote

I've tried three different variations of the script, still the same, meaning you are using some other scripts which are counter kicking those users, because the script I coded for you is correct, no logic problem what so ever.

Remove all scripts and only use the one I gave. Then restart and then check the bot.
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
outthere
Voice


Joined: 26 Nov 2005
Posts: 33

PostPosted: Wed Jul 18, 2007 11:06 pm    Post subject: Reply with quote

ok i did that and got same thing again.. i did have other scripts but i didnt load them and did a restart. maybe i should use a fresh bot. thanks for all the help i will try on a new one tomorrow. Confused
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 11:39 pm    Post subject: Reply with quote

*scratches* his head and wonders why..
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber