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.

Code for Trivia

Old posts that have not been replied to for several years.
Locked
f
finis

Code for Trivia

Post by finis »

hi, i need Code for trivia, for add questions whit and write this in a txt file ) /msg botnick answer*questions or !add answer*questions

thanks ..
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

Code: Select all

bind msg - !add proc_name
proc proc_name {nick uhost handle arg} {
  if {![file exists the_datafile]} {close [open the_datafile w]}
  set io [open the_datafile a]
  puts $io $arg
  close $io
  putserv "NOTICE $nick :Added; $arg"
}
Hope that helps.
Keep in mind, if running the trivia script, it may load the database file into memory so your newly added entries might not apear. You would need to look over the trivia script and determin how they load to memory and do the same within this proc_name.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
Locked