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.

Universal channel script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
CooLB0Y
Voice
Posts: 29
Joined: Fri Mar 26, 2004 2:06 pm
Location: Australia

Post by CooLB0Y »

x:drone:score (n), i didnt get the score, N and what should it be there? can i have an example for it please?
User avatar
dusk
Halfop
Posts: 91
Joined: Sun Mar 06, 2005 7:25 pm
Location: Belgium

Post by dusk »

That was fast demond :) , 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: Select all

(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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

.tcl ::xchannel::penalty CooLB0Y:ident
Tcl: 10
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

dusk wrote:That was fast demond :) , 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: Select all

(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 ;)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

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 ???
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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:
[19:18:21] tcl: evaluate (.tcl): loadmodule channels
Tcl: Bereits geladen.
Edit: added missing "not" ^^
Last edited by De Kus on Mon Sep 26, 2005 3:36 am, edited 2 times in total.
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...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

umm heh, I haven't thought about that

blame it all on eggheads :P 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: Select all

 tag when posting logs, code
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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

blame it all on eggheads :P 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) :D. 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...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

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:
hi hello
bye see you
and in lang.de you have:
hi hallo
bye auf wiedersehen
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

latest & greatest 3.4 is out, fixed bugs reported so far and added lag meter
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
R
Ravager
Voice
Posts: 3
Joined: Fri Nov 26, 2004 5:36 pm
Contact:

Post by Ravager »

I get this spammed in telnet/DCC 20+ times..:

Code: Select all

[17:17] Tcl error [::xchannel::mass]: Unknown channel setting.
EDIT: I forgot to mention that this is from version 3.4 of xchannel.tcl
Last edited by Ravager on Tue Sep 27, 2005 3:29 am, edited 1 time in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Ravager wrote:I get this spammed in telnet/DCC 20+ times..:

Code: Select all

[17:17] Tcl error [::xchannel::mass]: Unknown channel setting.
upgrade to latest version & recreate chanfile
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
subtlepoint
Voice
Posts: 12
Joined: Sat Dec 11, 2004 4:25 pm

you rock ;)

Post by subtlepoint »

truly awesome script once again man ;)
User avatar
dusk
Halfop
Posts: 91
Joined: Sun Mar 06, 2005 7:25 pm
Location: Belgium

Post by dusk »

I've done what you said demond, changed the tclchan.c, reconfigured, recompiled and restarted the bot (you know the drill), makes no difference....Some settings are always reset to default. It's not that big a problem for the replies but now i see that even x:caps always get reset after every restart.

Even tried to begin from scratch and changing the tclchan.c, same result...

Any other suggestions?

Thx & GRTZ
Post Reply