| View previous topic :: View next topic |
| Author |
Message |
Stafford Guest
|
Posted: Thu Mar 14, 2002 11:34 am Post subject: |
|
|
Hi, I've got this code and I need help with it. It does work but I don't receive any emails at all. Hope someone can help by reading the code Thanks
| Code: |
set timelmtvar ""
bind dcc m bugreport away:bugreport
proc away:bugreport {hand idx arg} {
global botname botnick galaxy_away timelmtvar version server
if {$arg == ""} {
putdcc $idx "Syntax: .bugreport <msg>"
return 1
}
if {[llength $arg] <=8} {
putdcc $idx "** Your Bug Report/Help Request or Suggestion is too short, message not sent! For more information, you may use ".ahelp bugreport" for assistance."
return 1
}
if {[expr $timelmtvar + 120] >= [unixtime]} {
putdcc $idx "** You cannot send more than 1 bug report/help request or suggestion every 2 minutes. For more information, you may use ".ahelp bugreport" for assistance."
return 0
}
set timelmtvar [unixtime]
set x [open ".sendrpt" w]
catch {set email [getuser $hand XTRA email]}
set hostname ""
set uname ""
catch {set hostname "on [info hostname] "}
catch {set uname "[unames] "}
puts $x "$arg"
puts $x "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
puts $x "This message is from $hand@$botnick ($email)"
puts $x "Running $galaxy_away(script) $galaxy_away(version) on Eggdrop[lindex $version 0] $hostname$unamew/ tcl[info tclversion]"
puts $x "Online as $botname on $server"
puts $x "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
close $x
set bug [open "|mail -s "BugReport from $hand@$botnick ($email)" plexus@purehype.net < .sendrpt" r]
while {![eof $bug]} {
catch {set responce [gets $bug]}
if {$responce == ""} {
putdcc $idx "Bug Report, Help Request Or Suggestion Sent Successfully."
} else {
putdcc $idx "Mail returned message/error: $responce"
putdcc $idx "For more information, you may use ".ahelp bugreport" for assistance."
}
}
catch {close $bug}
return 1
} |
I ain't sure if it has got anything got to do with my shell server. But, hope someone can figure it out
[ This Message was edited by: Stafford on 2002-03-14 08:35 ] |
|
| Back to top |
|
 |
|
|
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
|
|