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.

perlscript.mod in eggdrop 1.9

Discussion of Eggdrop's code and module programming in C.
Post Reply
s
shape
Voice
Posts: 4
Joined: Wed Oct 31, 2007 7:03 am

perlscript.mod in eggdrop 1.9

Post by shape »

Well i know that is in freezed developing
but it compiled working & run tcl scripts with limitations...
Question is about primitive perl script...
some information get from google cache (source unaccesible)
http://64.233.183.104/search?q=cache:AN ... ient=opera

on this words trying this sample

Code: Select all

&bind("pub","-","!hello","firstsub");

sub firstsub {
	my ($nick, $uhost, $handle, $chan, $args) = @_;
	putserv "PRIVMSG $chan :Hello!";
}


run it from partyline .perl loadscript "path/to/script"
and after calling !hello on channel bot crashes.
help me to find this problem solution plz.
ps: sorry 4 my english/
Last edited by shape on Thu Nov 01, 2007 3:34 am, edited 2 times in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

As this is a Tcl forum ....

At first glance it appears you actually have Perl & Tcl combined which I gather is incorrect.

I'd suggest getting onto freenode and check out one of the Perl scripting channels?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

I would hazard a guess if the original source is gone, the module is no longer supported.

If you want to run perl scripts, there are perl irc bots out there. Seems kinda silly to me to want to run perl scripts inside a tcl program like eggdrop.

You could also run perl or other scripts/executables from eggdrop by means of exec. That would probably be a better option than expecting to be able to translate perl into tcl on the fly by way of this module.
s
shape
Voice
Posts: 4
Joined: Wed Oct 31, 2007 7:03 am

Post by shape »

2 Alchera "As this is a Tcl forum ....", Isnt this eggdrop forum ?
2 rosc2112 "run perl scripts inside a tcl program like eggdrop.",
eggdrop 1.9 have script independent engine. scripting support realised as module at this moment eggdrop 1.9 have tclscript.mod perlscript.mod javascript.mod.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I would actually go even further, and saying eggdrops up until (and including) 1.6.18 is NOT a tcl program (tcl:et), but rather a tcl-enhanced software. Considdering this was posted under "Modules & Programming", I'd say the post is just in the right place.

Now, as for the actual query, did you get any coredumps?
NML_375
s
shape
Voice
Posts: 4
Joined: Wed Oct 31, 2007 7:03 am

Post by shape »

http://rapidshare.com/files/66718759/co ... 2.bz2.html
here is coredump but... how i can get something from it.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

You'll have to use the tool "gdb". Usually you'd start it like this:

Code: Select all

gdb eggdrop -c core.10252
Once started, issue the command "bt", and hit enter.
This will list a trace of function-calls up until the point where your bot crashed, usually pointing a finger at which function being bugged.
NML_375
s
shape
Voice
Posts: 4
Joined: Wed Oct 31, 2007 7:03 am

Post by shape »

Code: Select all

Program terminated with signal 11, Segmentation fault.
#0  0xb7e083b7 in c_to_perl_var (v=0xbfea5ad8) at perlscript.c:371
371                             handle = u->handle;
(gdb) bt
#0  0xb7e083b7 in c_to_perl_var (v=0xbfea5ad8) at perlscript.c:371
#1  0xb7e089e8 in my_perl_callbacker (me=0x80f30d8) at perlscript.c:229
#2  0xb7f77d35 in bind_entry_exec (table=0x80ae158, entry=0xbfea5ad8,
    al=0xb7e16be4) at binds.c:335
#3  0xb7f78059 in bind_vcheck_hits (table=0x80ae158, user_flags=0x0,
    match=0xbfea5f0a "!hello", hits=0x0, ap=0xbfea5bdc "▒^▒▒^▒")
    at binds.c:447
#4  0xb7f78205 in bind_check (table=0x80ae158, user_flags=0x0,
    match=0xbfea5f0a "!hello") at binds.c:373
#5  0xb70bcb04 in gotmsg (from_nick=0xbfea5ee4 "shape",
    from_uhost=0xbfea5eea "F@mail.ien.ru", u=0x0, cmd=0xbfea5ef8 "PRIVMSG",
    nargs=2, args=0xbfea5dc0) at input.c:306
#6  0xb7f77d35 in bind_entry_exec (table=0x80adfc8, entry=0xbfea5ad8,
    al=0xb7e16be4) at binds.c:335
#7  0xb7f78059 in bind_vcheck_hits (table=0x80adfc8, user_flags=0x0,
    match=0xbfea5ef8 "PRIVMSG", hits=0x0, ap=0xbfea5cfc "▒^▒▒^▒")
    at binds.c:447
#8  0xb7f78205 in bind_check (table=0x80adfc8, user_flags=0x0,
    match=0xbfea5ef8 "PRIVMSG") at binds.c:373
#9  0xb70bce4f in server_LTX_server_parse_input (text=<value optimized out>)
    at input.c:70
#10 0xb70bf054 in server_on_read (client_data=0x0, idx=4,
    text=0xbfea5ee3 ":shape", len=45) at servsock.c:156
#11 0xb7f873a7 in sockbuf_on_read (idx=4, level=6000,
    data=0xbfea5ee3 ":shape", len=45) at sockbuf.c:283
#12 0xb7f818ac in linemode_on_read (client_data=0x80c03a8, idx=4,
    data=0xbfea5ee3 ":shape", len=47) at linemode.c:77
#13 0xb7f873d7 in sockbuf_on_read (idx=4, level=-1, data=0xbfea5ee3 ":shape",
    len=47) at sockbuf.c:277
#14 0xb7f88c3c in sockbuf_update_all (timeout=998) at sockbuf.c:425
#15 0x08050595 in main (argc=1, argv=0xbfea7064) at main.c:493
here it is...
one thing left for undestand what is exactly goes wrong
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

At a first glance, it would seem it chokes when trying to create the $handle perl variable from the internal data structures.
I'm not sure if/how the 1.9 tree is progressing, but it might be worth sending a bugreport to eggheads.org, including this "bt"
NML_375
Post Reply