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 

Error creating directory?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
DJCharlie
Voice


Joined: 06 May 2009
Posts: 37

PostPosted: Sun Apr 18, 2010 4:24 pm    Post subject: Error creating directory? Reply with quote

Afternoon all. I'm having a bit of trouble with a small script, and can't find the error I'm getting ANYWHERE else.

The error is:

Code:
[16:16] Tcl error [pub_epage]: event sending error: error creating directory for the contact


The section of the script in question is:

Code:
proc pub_epage {nick uhost hand chan txt} {
   putserv "PRIVMSG #KJSR :Emergency Pager activated! Someone will assist you momentarily."
   putserv "PRIVMSG MemoServ@services.dal.net :SEND DJCharlie You were paged by $nick"
   set pagestatus [exec /usr/local/autodj/eggdrop/scripts/epage.sh]
}


And the shell script (epage.sh) called by the TCL script is:

Code:
#!/bin/bash
echo "You are needed in the Live Chat" | centerim -s msg -p yahoo -t myemailaddress@mydomain.com
talk "can someone come to the live chat please"
echo "Help needed in LiveChat" | mail -s "LiveChat" xxxxxxxxx@txt.att.net
exit


Any ideas?
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Apr 18, 2010 6:29 pm    Post subject: Reply with quote

Try and get the value of ::errorInfo right after triggering the error. You might have to enable the .set or .tcl dcc partyline command (see your configfile for details on this), then type either ".set ::errorInfo" or ".tcl set ::errorInfo" after triggering the error.

My suspicion right now though, is that it's caused by the centerim command in your bash-script, possibly from being executed from your eggdrop directory. Just a guess right now though..
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
DJCharlie
Voice


Joined: 06 May 2009
Posts: 37

PostPosted: Sun Apr 18, 2010 6:49 pm    Post subject: Reply with quote

nml375 wrote:
Try and get the value of ::errorInfo right after triggering the error. You might have to enable the .set or .tcl dcc partyline command (see your configfile for details on this), then type either ".set ::errorInfo" or ".tcl set ::errorInfo" after triggering the error.

My suspicion right now though, is that it's caused by the centerim command in your bash-script, possibly from being executed from your eggdrop directory. Just a guess right now though..


No joy. The errorInfo commands (I tried both) just returned "0" as the response.

Commenting out the centerim command did no good either. Same with cutting out any of the other commands (individually) in the epage.sh script.
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Apr 18, 2010 7:13 pm    Post subject: Reply with quote

Just downloaded and compiled centerim myself. After attempting a similar message (though over icq), I managed to generate the exact same error message. That strengthens my suspisions of centerim. I also get the very same result if I launch it through a bash-shell.

I find it odd that ::errorInfo would be 0, as it should atleast hold the actual error message (+ extra information leading up to the error).

Unfortunately, I'm out of other ideas, the putserv tcl-command will not generate that error under any condition, and as you said you've tried ruling out each line of your bash-script, I frankly don't know where to look further other than re-checking everything over and over..
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
DJCharlie
Voice


Joined: 06 May 2009
Posts: 37

PostPosted: Sun Apr 18, 2010 7:44 pm    Post subject: Reply with quote

nml375 wrote:
Unfortunately, I'm out of other ideas, the putserv tcl-command will not generate that error under any condition, and as you said you've tried ruling out each line of your bash-script, I frankly don't know where to look further other than re-checking everything over and over..


Additionally, I just noticed that the "talk" line in epage.sh isn't being executed... Something screwy is definitely going on with it somewhere, because if I run epage.sh by itself, it executes with no errors.
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Apr 19, 2010 3:17 pm    Post subject: Reply with quote

There are two differences when a bash-script is started from the command line and using exec within eggdrop;
  • The environment;
    The bash-script will inherit the environment of the parent process, containing such settings as PATH, and similar. This becomes very prominent if you started your eggdrop through a cronjob - as this usually only provides the very most rudimentary environment. Try this from the partyline:
    Code:
    .tcl array get ::env

    This should retrieve the full set of environment variables as seen by your eggdrop. Then compare that from using the "set" command from your bash-shell...

  • Current Working Directory;
    This too is inherited from the parent process. Eggdrop's are usually started from within the directory where it was installed, while you most commonly use your shell directly from the home directory. If centerim cannot differentiate between these, I could very well see it throwing errors such as the earlier mentioned ones..

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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