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.

NewChanBan Troubles.

Old posts that have not been replied to for several years.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

No difference.
[16:35:57] <Testy> !afk 1 test
[16:35:57] <Minako> Away Kick Engaging
[16:35:58] * Testy was kicked by Minako (You have requested force timeout from the channel for 1 minutes.)
[16:36:15] * Joins: Testy (~testy@216.105.160.17)

[16:36:31] <Minako> ! [ 6] *!testy@216.105.160.* (expires at 16:36)
[16:36:31] <Minako> Minako: test
[16:36:31] <Minako> Created 16:35
[16:36:59] <Minako> [16:37] No longer banning *!testy@216.105.160.* on #weirdo (expired)
[/quote]
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

# Set this to 1 if you don't want your the bot to strip a leading '~'
# on user@hosts.
set strict-host 1

^^ have u tried editing that in your config?

or u might wanna try and change

Code: Select all

[maskhost "$nick!$uhost"]
to

Code: Select all

[maskhost "$nick!*$uhost"]
Elen sila lúmenn' omentielvo
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

That got it :)

I changed the Strict host thing in the config from 0 to 1
[16:49:41] * Minako sets mode: +b *!?testy@216.105.160.*
[16:49:42] <Minako> Away Kick Engaging
[16:49:43] * Testy was kicked by Minako (banned: test)
That was the effect. Doesnt do the kick i wanted to. Is there a config setting for that as well? As i have never managed to find it personally. She always did it automatically.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

in the partyline do: .chanset #channel -enforcebans
then: .chansave

that should give u the kick u want :)
Elen sila lúmenn' omentielvo
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

[17:17:40] <Testy> !afk 2 Multi word testing
[17:17:40] * Minako sets mode: +b *!?testy@216.105.160.*
[17:17:41] <Minako> Away Kick Engaging
[17:17:42] * Testy was kicked by Minako (banned: Multi word testing)

Well, i like this :)

It does something i didnt expect it to. Which was more than one word in the reason. But it doesnt give the correct kick message which was specified. Enforce bans is off. Any other settings i should know off that does this?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

the multi-word reason was because of the [lrange [split $text] 1 end] I added, thought u'd like it ;)

the kickmsg should work, it does on my bot. Try restarting it.
Elen sila lúmenn' omentielvo
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

[17:26:54] <Testy> !afk 10 I am a [censored]
[17:26:54] * Minako sets mode: +b *!?testy@216.105.160.*
[17:26:55] <Minako> Away Kick Engaging
[17:26:56] * Testy was kicked by Minako (banned: I am a [censored])

Very strange that it doesnt. Does mean it can be more fun :)

Screw it, never ever get perfect will it :)

17:27:48] <Minako> Channel bans for #cometanime: (! = not active, * = not placed by bot)
[17:27:48] <Minako> [ 6] *!?testy@216.105.160.* (expires at 17:36)
[17:27:48] <Minako> Minako: I am a [censored]
[17:27:48] <Minako> Created 17:26

As long as it records it right in the bans, which it does, i am happy. Was just curious why it didnt do the right kick message :)

What ill do is change the public message

putserv "PRIVMSG $chan :Enforce Away Engaged, Bantime set to $bantime minutes."

And ill remove the kick message :)
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Uhm, you want the kick message to be only one word? Ok, change:

set reason [lrange [split $text] 1 end]

to:

set reason [lindex [split $text] 1]

That should catch only one word.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

Hi

Well it works perfectly :)

Occasionally the timer is a bit off, 1 minute becomes 15 seconds or so. But it works the way i want it to :)

What i want to know is how can i tidy this code up? Tried playing with some of the variables, but it doesnt like me changing it from what it is. Any help?

Thank you BTW to all of you who helped me get the script running :)

Code: Select all

#AFKKick Suite Version 1
#Developed by Weirdo
#Designed for Single Channel use on #cometanime

#AFKKick Variables
set AFKdefbantime "10"
set AFKdefreason "AFKKick Suite Version 1"

#w3rkKick Variables
set w3rkdefbantime "15"
set w3rkdefwarntime "15"
set w3rkdefreason "W3rk"
set kickmsg2 "Go do the stuff you need to do!"

#General Variables



#Public Command for the afkkick
bind pub - !afk pub:afkkick_kick
proc pub:afkkick_kick {nick uhost hand chan text} {
	global AFKdefbantime AFKdefreason botnick banmask
	set bantime [lindex [split $text] 0 ]
	if {$bantime == ""} {set bantime $AFKdefbantime}
	set reason [lrange [split $text] 1 end]
	if {$reason == ""} {set reason $AFKdefreason}
	set creator $botnick
	set banmask [maskhost "$nick!$uhost"]
	set kickmsg "You have requested force timeout from the channel for $bantime minutes."
	putserv "PRIVMSG $chan :Enforce Away Engaged, Bantime set to $bantime minutes."	
	puthelp "KICK $chan $nick :$kickmsg"	
	newchanban $chan [maskhost "$nick!$uhost"] $creator $reason $bantime 
}

#Public Command for the timer Kick
bind pub - !w3rk pub:w3rk_timer
proc pub:w3rk_timer {nick uhost hand chan text} {
	global kickmsg2 bantime2 warntime w3rk_reason knick kchan khost w3rkdefwarntime w3rkdefbantime w3rkdefreason
	set warntime [lindex [split $text] 0]
	if {$warntime == ""} {set warntime $w3rkdefwarntime}
	set bantime2 [lindex [split $text] 1]
	if {$bantime2 == ""} {set bantime2 $w3rkdefbantime}
	set w3rk_reason [lrange [split $text] 2 end]
	if {$w3rk_reason == ""} {set w3rk_reason $w3rkdefreason}
	set knick $nick
	set kchan $chan
	set khost $uhost
	set warning "You now have $warntime minutes left in irc. Ban will be lifted $bantime2 minutes from the time you are kicked."
	puthelp "Privmsg $chan :$warning"
	putlog "!$nick! Activated Timer Work Script in $chan - kick in $warntime minutes"
	timer $warntime w3rk_ban
}

proc w3rk_ban {} {	
	global bantime2 kickmsg2 botnick w3rk_reason knick kchan khost
	newchanban $kchan [maskhost "$knick!$khost"] $botnick $w3rk_reason $bantime2
	putserv "KICK $kchan $knick :$kickmsg2"
}	

putlog "\AFKKick Suite V1 by Weirdo is now loaded"
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

After some more testing, i found the script bans on the minute. So when it reaches HH:mm:00 it will ban, no matter what time the !w3rk was set

[15:21:17] <meru|mrrr> !w3rk 1 1 feck off
[15:21:20] <Minako> You now have 1 minutes left in irc. Ban will be lifted 1 minutes from the time you are kicked.
[15:21:28] <meru|mrrr> aah, this I like :)
[15:21:37] <IWubDBs> heh
[15:21:45] * Bless gets popcorn
[15:21:59] * Minako sets mode: +b *!?merumrrr@216.105.160.*
[15:22:01] * meru|mrrr was kicked by Minako (banned: feck off)
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

That's because you are using 'timer' that is hooked to hh:MM:ss and only does evaluate if MM > oldMM, regardless of ss. You may consider using utimer 60 which would give you 60 seconds timing in any case.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

Problem is, cause the timer is used with a channel command, its kinda hard to convert 15 minutes into seconds on the fly for some people.

I have to use timer, as the time can vary immensly
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

So convert it inside your proc.

set seconds [expr $minutes * 60]

:p
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

That would work? Hmmmm, hadnt thought that was possible. ill give it a go :)
Locked