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.

Help with this source code

Old posts that have not been replied to for several years.
Locked
S
Stafford

Post by Stafford »

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 :smile: Thanks

Code: Select all

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 :smile:


<font size=-1>[ This Message was edited by: Stafford on 2002-03-14 08:35 ]</font>
Locked