This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ask for help

Old posts that have not been replied to for several years.
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

Sorry guys, i'm late to reply because i'm so busy with my work.
so is MeTroiD code is right or not?
MeTroiD wrote:Here is an banenforcement script.

Code: Select all

setudef flag enforce

bind mode - "% +b" ban:enforce

proc ban:enforce { nick host hand chan mode mask } { 
global botnick
if {![channel get $chan enforce]} { 
return 
 } 
foreach user [chanlist $chan] {
if {[string match -nocase $mask $user![getchanhost $user]]} {
if {$user == "$botnick"} {
putquick "PRIVMSG $chan :Do not ban me."
} else {
putquick "KICK $chan $user :You are BANNED from this channel."
}
}
}
}
I was working on it awhile back and i dont know if i ever finished it
i will try this code :)
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

i already do testing this code from MeTroiD but seems like it doesn't work, bot still quite and no respond at all :( with banning. i have some question in here that i seen other bot banned ppl. here's the example.

* qyUsuaO [~dsksIs@BSN-77-23-194.dsl.siol.net] has joined #****
* Gy\fFsoA [hoOsTv@BSN-77-23-194.dsl.siol.net] has joined #****
* Z\hauUs [~tYsgUs@BSN-77-23-194.dsl.siol.net] has joined #****

[mode/#****(+b *!*@BSN-77-23-194.dsl.siol.net)] by Owner
Gy\fFsoA was kicked off #**** by Owner (out spam.)
qyUsuaO was kicked off #**** by bot1 (banned: out spam.)
Z\hauUs was kicked off #**** by bot2 (banned: out spam.)

is this enforce ban or another script that he reload on eggdrop?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

qwek wrote:is this enforce ban or another script that he reload on eggdrop?
Would seem a script loaded that works. :wink:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

qwek wrote:i already do testing this code from MeTroiD but seems like it doesn't work, bot still quite and no respond at all :( with banning. i have some question in here that i seen other bot banned ppl. here's the example.

* qyUsuaO [~dsksIs@BSN-77-23-194.dsl.siol.net] has joined #****
* Gy\fFsoA [hoOsTv@BSN-77-23-194.dsl.siol.net] has joined #****
* Z\hauUs [~tYsgUs@BSN-77-23-194.dsl.siol.net] has joined #****

[mode/#****(+b *!*@BSN-77-23-194.dsl.siol.net)] by Owner
Gy\fFsoA was kicked off #**** by Owner (out spam.)
qyUsuaO was kicked off #**** by bot1 (banned: out spam.)
Z\hauUs was kicked off #**** by bot2 (banned: out spam.)

is this enforce ban or another script that he reload on eggdrop?
To make this script kick out all, use a delayed putserv KICK, with a 1-2sec utimer after clones have joined, if you want it to kick all. But the best is to use newchanban, it would automatically match and kick out all the ips matching the banned mask.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

You have to use .chanset #chan +enforce if you want it to kickban people that get banned or it won't work as what you showed us wasnt my script
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

metroid: thanks :) it's turn on now.

i have a lil question in here, i'm downloading some tcl from egghelp.org.

here's the code:
#
# Bantime in seconds
set check(bantime) "600"


bind join - * checkthisnick

setudef flag nickcheck

set check(kmessage) "You were detected as a Spam/Flood-bot. To join this channel, pls change your nick to something... erm...normal"

set check(cons) "bcdfghjklmnpqrstvxyz"
set check(good) "tt ll ss"
set check(affixture) "off bnc \[ \] afk"

proc checkthisnick { nick uhois hand chan} {
global check
if {[lsearch -exact [channel info $chan] +nickcheck] == -1} {return 0}
set const_count 0
set score 0
set txt [list $nick]

# basic l337-translat0r
set txt [string map "0 o 1 l 3 e 7 t 4 a" $txt]

# Remove double-cons
foreach x [split $check(good)] {
set txt [string map -nocase "$x \"\"" $txt]
}
# Remove "off","bnc" etc and lower score
foreach x [split $check(affixture)] {
if {[string match -nocase *$x* $txt]} {
set txt [string map -nocase "$x \"\"" $txt]
set score [expr $score - 10]
}
}

# Check cons frequency
for {set x 0} {$x<[string length $txt]} {incr x} {
if {[string last [string index $txt $x] $check(cons)] > -1} {
incr const_count
if {$const_count >= 3} { set score [expr $score+10] }
} else {
set const_count 0
}

}
if {$score >= 30} {
putlog "Found suspicious nickname in $chan: $nick ($score)"
pushmode $chan +b "$nick!*@*"
flushmode $chan
putkick $chan $nick "$check(kmessage) -blub"
utimer $check(bantime) "[list pushmode $chan -b "$nick!*@*"]"
}
}

this code only ban a nick, but i want ban the host.
could anyone help me? thank you.

regards,
qwek
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

make it ban $host will prolly work
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

MeTroiD wrote:make it ban $host will prolly work
i already set a $host / $banmask
and set banmask "*!*@[lindex [split $uhost @] 1]"
but still can't banning host/banmask.
or maybe got different proc in there :D
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well your variable for the user@host here is "uhois" in the proc so it should be $uhois not $uhost.

set banmask "*!*@[lindex [split $uhois "@"] 1]"
putserv "MODE $chan +b $banmask"
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

awyeah: finally it's working now :D thank you very much dude. i hate this way to do when spammer rejoining with random nick and the bot always banned the nick not host, this make banlist full with spammer nickname.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

I would suggest you use regexp for complex string matching for random/drone nicks like I do. But the only bad part its, you cannot match specific numbers, only alphabets.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

awyeah: how?
awyeah: i have a lil problem with my bots, when i do put 1 tcl in to my shell and loaded and then running. then i'm trying to remove 1 tcl from config file, and i do restarting the bots.

but i dont know seems like old tcl that i remove from config file still running, i already check the codes but i can't find that codes running in. then i killed the bots from ssh and let them turn on by crontab, but when they're joining back again still seems like running old tcl that i remove before.

ok now i take the example from enforceban tcl. i put in in conf files that tcl, but when i dont want it again i remove that codes from conf. but i still dont know why that codes still running. last time i was found same problem like this, whenever i remove some codes from my conf. seems like the codes are record at my bots.

do you have any solutions for this? :(

sorry with my bad english.

regards and thank you.
qwek.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well that cannot be. If the script is unloaded in the bot, and you restart it not REHASH it; then that script would obviously not be loaded into the bot.

Make sure you edit the .conf file remove the 'source scripts/myscript.tcl' line or comment it. Then save the file and restart the bot.

If you bots are linked and one of the bot's has that tcls in the linked botnet then all bots would respond to it. :mrgreen:

As for enforceban.tcl check to see if the channel is set to +enforcebans, if it is enabled disable enforcebans and set it to -enforcebans so the bot doesn't kick all users matching a banned mask in the channel.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
qwek
Voice
Posts: 35
Joined: Tue Sep 21, 2004 7:51 am
Location: space

Post by qwek »

Hi Awyeah,

awyeah: do you know where's can i find some tcl code/script for 1 script thats loading some protection for channel. like when network/channel are going to netsplit/spam bot flood are joining the channel which has a large user joining the channel and i want my bot auto mode channel +mi or +MR for protected the channel incase the channel has been join flooded. i've just setup at sentinel tcl but seems like it wasn't working like that i want. bot only respon a flooder text or join part flooder and bogus username.

i was searching some of a script like this but unfortunately i can't find from tcl website or do you have this? hehe :D.

best regards,
qwek
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Have we tried searching the TCL Archive?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked