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 

Universal channel script
Goto page Previous  1, 2, 3, 4 ... 13, 14, 15  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Sep 15, 2005 3:09 am    Post subject: Reply with quote

3.0 is out

added revolving door and bad /whois (realname, channels (including too many), server) handlers; a little more to come
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 18, 2005 9:15 pm    Post subject: Reply with quote

that's it folks, I'm done with xchannel; it has everything I deemed necessary for most people, and it should make all other protection scripts obsolete Laughing j/k, time will show, but I think I achieved my objective - highly-optimized and versatile code with 100% chanset-based configuration that should appeal to the majority of bot owners

there will be no next version unless people report bugs

the last is version 3.2, I've added drone detection (based on improved spambuster heuristics) and done some final [punish] changes
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Mon Sep 19, 2005 5:08 pm    Post subject: Reply with quote

I just downloaded the script and nicely done!!

I just have one problem : when I restart the bot I'm always getting this error : (22:54) <Cube> [22:54] xchannel-3.2: ERROR: no channels defined .

After a rehash everything works fine again.

I'm getting this after every .restart .

Grtz
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Sep 19, 2005 9:19 pm    Post subject: Reply with quote

that happens because on (re)start eggdrop actually loads chanfile after loading its config (and any scripts sourced in it), so at that point xchannel doesn't know about any channels

I'll find a way around this
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Sep 20, 2005 1:41 am    Post subject: Reply with quote

alrighty, fixed the restart thing in 3.3
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
CooLB0Y
Voice


Joined: 26 Mar 2004
Posts: 29
Location: Australia

PostPosted: Tue Sep 20, 2005 4:41 am    Post subject: Reply with quote

x:drone:score (n), i didnt get the score, N and what should it be there? can i have an example for it please?
Back to top
View user's profile Send private message
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Tue Sep 20, 2005 8:19 am    Post subject: Reply with quote

That was fast demond Smile , error's gone.

But I have a second little problem now,

Some settings of the 'User defined channel strings' return to default after a restart. I can succesfully set every setting before ' x:bad:punish'
all settings that come after that return to default when bot's restarted.

These are de ones that return to default on my bot :

Code:

(14:12) <Cube> x:bad:punish: w:k:b
(14:12) <Cube> x:bad:reason: {do not curse}
(14:12) <Cube> x:caps:punish: w:k:b
(14:12) <Cube> x:caps:reason: {caps off}
(14:12) <Cube> x:color:punish: w:k:b
(14:12) <Cube> x:color:reason: {no colors}
(14:12) <Cube> x:mass:rate: 20:3
(14:12) <Cube> x:repeat:rate: 3:10
(14:12) <Cube> x:whois:file: badwhois.txt
(14:12) <Cube> x:bad:file: badwords.txt


Grtz
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Sep 20, 2005 11:08 pm    Post subject: Reply with quote

CooLB0Y wrote:
x:drone:score (n), i didnt get the score, N and what should it be there? can i have an example for it please?


when you enable the drone scanner (.chanset #channel +x:drone), the script will be analyzing every nick!user on join and assign a score to it; that score is proportional to the degree of randomness of that nick & user; normally, people would have nicks that yield a score less than the threshold x:drone:score (by default 30), and (lame) drones with randomly generated nicks will yield a score above the threshold

you can experiment with the score by invoking the proc directly:
Code:

.tcl ::xchannel::penalty CooLB0Y:ident
Tcl: 10

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Sep 20, 2005 11:44 pm    Post subject: Reply with quote

dusk wrote:
That was fast demond Smile , error's gone.

But I have a second little problem now,

Some settings of the 'User defined channel strings' return to default after a restart. I can succesfully set every setting before ' x:bad:punish'
all settings that come after that return to default when bot's restarted.

These are de ones that return to default on my bot :

Code:

(14:12) <Cube> x:bad:punish: w:k:b
(14:12) <Cube> x:bad:reason: {do not curse}
(14:12) <Cube> x:caps:punish: w:k:b
(14:12) <Cube> x:caps:reason: {caps off}
(14:12) <Cube> x:color:punish: w:k:b
(14:12) <Cube> x:color:reason: {no colors}
(14:12) <Cube> x:mass:rate: 20:3
(14:12) <Cube> x:repeat:rate: 3:10
(14:12) <Cube> x:whois:file: badwhois.txt
(14:12) <Cube> x:bad:file: badwords.txt


Grtz


this is an eggdrop bug, I'll report it to eggheads

it is caused by length limitations in processing of channel options read from chanfile - xchannel adds plenty of those and eventually some are ignored on loading chanfile because of limited buffer size

I hope they'll fix that in 1.6.18, but for the time being you can fix it yourself just as I did, by editing src/mod/channels.mod/tclchan.c and substituting all occurances of the number 2048 with 4096, also 2047 with 4095 (these are in one function only, tcl_channel_add()); don't forget to recompile, reinstall & restart the bot after you are done with that Wink
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Sep 22, 2005 11:46 pm    Post subject: Reply with quote

it seems that has already been fixed in 1.6.18; so you might want to grab it from the CVS as well
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Dizzle
Op


Joined: 28 Apr 2005
Posts: 109

PostPosted: Sun Sep 25, 2005 1:08 pm    Post subject: Reply with quote

Quote:
xchannel-3.2: ERROR: channels module is not loaded


I get this msg, i there anything im doing wrong, i do load the channel module in the config
_________________
What's this real life ppl keep talking about ??? And where can I download it ???
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Sep 25, 2005 2:21 pm    Post subject: Reply with quote

this message occurs because you either running eggdrop with englishnot as default language or you obviously added the source line before the loadmodule of channels.

When running bot with German as primary language:
Quote:
[19:18:21] tcl: evaluate (.tcl): loadmodule channels
Tcl: Bereits geladen.


Edit: added missing "not" ^^
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...


Last edited by De Kus on Mon Sep 26, 2005 3:36 am; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 25, 2005 2:50 pm    Post subject: Reply with quote

umm heh, I haven't thought about that

blame it all on eggheads Razz who chose to return language-dependant string as status indicator from a proc

well, maybe I should parse [modules] output instead

anyhow, I'll fix that
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Sep 26, 2005 3:38 am    Post subject: Reply with quote

demond wrote:
umm heh, I haven't thought about that

blame it all on eggheads Razz who chose to return language-dependant string as status indicator from a proc

Hmm, i haven't found a TCL command to access the language file. Maybe that would be worth a feature request for the bugtracker ^-^?
I mean you could create your own language files for your script (packs) Very Happy. The benefit would be, you could even use the capility to use a channel specific language and not only a global one.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Sep 26, 2005 4:32 am    Post subject: Reply with quote

well, there's no point of reading eggdrop's language files from Tcl, hence the lack of such Tcl interface

however, nothing's stopping you from creating your own language files for exclusive use in your scripts, for example:
Code:

namespace eval dekus {
   set language .de
   bind pubm - "% hi" foo
   bind pubm - "% bye" foo
   proc foo {n u h c t} {
      putchan $c [getstr $t]
   }
   proc getstr str {
      variable strings
      variable language
      set idx [lsearch -index 0 $strings($language) $str]
      return [lindex [lindex $strings($language) $idx] 1]
   }
   foreach file [glob lang.*] {
      set f [open $file]
      set lang [file extension $file]
      foreach e [split [read $f] \n] {
         set key [lindex [split $e] 0]
         set str [join [lrange [split $e] 1 e]]
         lappend strings($lang) [list $key $str]
      }
      close $f
   }
}

in lang.en you have:
Quote:

hi hello
bye see you

and in lang.de you have:
Quote:

hi hallo
bye auf wiedersehen

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4 ... 13, 14, 15  Next
Page 3 of 15

 
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