| View previous topic :: View next topic |
| Author |
Message |
DJCharlie Voice
Joined: 06 May 2009 Posts: 37
|
Posted: Sun Apr 18, 2010 4:24 pm Post subject: Error creating directory? |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Apr 18, 2010 6:29 pm Post subject: |
|
|
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 |
|
 |
DJCharlie Voice
Joined: 06 May 2009 Posts: 37
|
Posted: Sun Apr 18, 2010 6:49 pm Post subject: |
|
|
| 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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Apr 18, 2010 7:13 pm Post subject: |
|
|
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 |
|
 |
DJCharlie Voice
Joined: 06 May 2009 Posts: 37
|
Posted: Sun Apr 18, 2010 7:44 pm Post subject: |
|
|
| 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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Apr 19, 2010 3:17 pm Post subject: |
|
|
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 |
|
 |
|