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.

Game setups

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

Game setups

Post by StarCat »

I have been looking for a script for some time now and have tried to write my own, but to no avail =[ If anyone know of a script thats fits this or is willing to write one =] I would be very greatfull. I'm looking for a "srimage" script
Allows clans to add their clan to a list on the bot of clans looking to scrimage other clans. For instence. !add Clan:[WTF] Players:7 time:9pm Map:mp_castle when people type !scrimlist the bot will publicly display a list of clans with the info above, that have been added for that night.

Thanks for any help :lol:
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 pub - !add proc_add
proc proc_add {nick uhost handle channel arg} {
  set file datafile
  if {![file exists $file]} {close [open $file w]}
  set io [open $file w]
  puts $io $arg
  close $io
  putserv "PRIVMSG $channel :Added; $arg"
}

bind pub - !remove proc_remove
proc proc_remove {nick uhost handle channel arg} {
  set file datafile
  if {![file exists $file]} {close [open $file w]}
  set io [open $file r]
  set list ""
  while {![eof $io]} {
    gets $io line
    set line [string tolower $line]
    if {([string trim $line] == "") ||
        ($line == [string tolower $arg])} {continue}
    lappend list $line
  }
  close $io
  set io [open $file w]
  foreach line $list {puts $io $line}
  close $io
  putserv "PRIVMSG $channel :Removed; $arg"
}

bind pub - !scrimlist proc_scirmlist
proc proc_scirmlist {nick uhost handle channel arg} {
  set file datafile
  if {![file exists $file]} {close [open $file w]}
  set io [open $file r]
  set list ""
  while {![eof $io]} {
    gets $io line
    if {[string trim $line] == ""} {continue}
    lappend list $line
  }
  close $io
  set length [llength $list]
  set message "$length match[expr {($length == "1")?"":"es"}] found;"
  putserv "PRIVMSG $channel :$message"
  foreach line $list {
    putserv "PRIVMSG $channel :$line"
  }
}
Hope that helps. This may have a bug here and there, I didn't test it.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
Locked