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:
#!/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
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..
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.
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..
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.
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:
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..