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 

Help with this source code

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Stafford
Guest





PostPosted: Thu Mar 14, 2002 11:34 am    Post subject: Reply with quote

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:

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


[ This Message was edited by: Stafford on 2002-03-14 08:35 ]
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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