Code: Select all
set gamefile "scripts/game.txt"
if {![file exists $gamefile]} {
catch {close [open $gamefile w]}
}
bind pub - !add pub:add
proc pub:add {nick uhost hand chan arg} {
set game [lindex [split $arg] 0]
set code [lindex [split $arg] 1]
if {$game != "" && $code != ""} {
set fd [open $::gamefile r+]
while {![eof $fd]} {
lappend list [gets $fd]
}
if {[lindex $list end] == ""} {
set list [lreplace $list end end]
}
lappend list "\[$nick\] <$game> <$code>"
seek $fd 0
puts -nonewline $fd [join $list \n]
close $fd
} else {
putserv "PRIVMSG $nick :Usage: !add <game> <code>"
}
}
Code: Select all
##########################################################
#Friendcodes IRC script written by monie #
#email monie <xg.monie089@gmail.com> #
#monie @ Friendcodes #NintendoXG,#IRCsupport,#Friendcodes#
##########################################################
bind pub -|- !friendcodes pub:friendcodes
proc pub:friendcodes {nickname hostname handle channel arguments } {
putquick "PRIVMSG $nickname :$nickname Welcome ShadowBot Wifi Central"
putquick "PRIVMSG $nickname :$nickname,To use WiFi Central"
putquick "PRIVMSG $nickname :Games currently supported are"
putquick "PRIVMSG $nickname :MKDS,MPH,LM,THAS,DSAIR,StarFox"
putquick "PRIVMSG $nickname :Type !add <game> <code> "
putquick "PRIVMSG $nickname :To find a friendcode type"
putquick "PRIVMSG $nickname :!find <nick>"
putquick "PRIVMSG $nickname :To Delete Your code type"
putquick "PRIVMSG $nickname :!del <game>"
putquick "PRIVMSG $nickname :Scripted by MÔnie"
}
set gamefile "scripts/game.txt"
if {![file exists $gamefile]} {
catch {close [open $gamefile w]}
}
bind pub - !add pub:add
proc pub:add {nick uhost hand chan arg} {
set game [lindex [split $arg] 0]
set code [lindex [split $arg] 1]
if {$game && $code != ""} {
set fd [open $::gamefile r+]
while {![eof $fd]} {
lappend list [gets $fd]
}
lappend list "[$nick] <$game> <$code>"
puts -nonewline $fd [join $list \n]
close $fd
} else {
putserv "PRIVMSG $chan :Usage: !add <game> <code>"
}
}
putlog "Monies custom Friendcodes script loaded"
Code: Select all
##########################################################
#Friendcodes IRC script written by monie #
#email monie <xg.monie089@gmail.com> #
#monie @ Friendcodes #NintendoXG,#IRCsupport,#Friendcodes#
##########################################################
bind pub -|- !friendcodes pub:friendcodes
proc pub:friendcodes {nickname hostname handle channel arguments } {
putquick "PRIVMSG $nickname :$nickname Welcome ShadowBot Wifi Central"
putquick "PRIVMSG $nickname :$nickname,To use WiFi Central"
putquick "PRIVMSG $nickname :Games currently supported are"
putquick "PRIVMSG $nickname :MKDS,MPH,LM,THAS,acww"
putquick "PRIVMSG $nickname :Type !add <game> <code> "
putquick "PRIVMSG $nickname :To find a friendcode type"
putquick "PRIVMSG $nickname :!find <nick>"
putquick "PRIVMSG $nickname :To Delete Your code type"
putquick "PRIVMSG $nickname :!del <game>"
putquick "PRIVMSG $nickname :Scripted by MÔnie"
}
set gamefile "scripts/game.txt"
if {![file exists $gamefile]} {
catch {close [open $gamefile w]}
}
bind pub - !add pub:add
proc pub:add { nick uhost hand chan arg} {
set game [lindex [split $arg] 0]
set code [lindex [split $arg] 1]
if {$game && code != ""} {
set fd open $::mphfile r+]
while {![eof $fd]} {
lappend list [gets $fd]
}
lappend list "[$nick] $game $code"
puts -nonewline $fd [join $list \n]
close $fd
} else {
putserv "PRIVMSG $nickname :Usage: !add <game> <code>"
}
}
bind pub - !find pub:find
proc pub:find {nick uhost hand chan arg} {
}
putlog "Monies custom Friendcodes script loaded"
Code: Select all
set gamefile "scripts/game.txt"
if {![file exists $gamefile]} {
catch {close [open $gamefile w]}
}
bind pub - !add pub:add
proc pub:add {nick uhost hand chan arg} {
set game [lindex [split $arg] 0]
set code [lindex [split $arg] 1]
if {$game != "" && $code != ""} {
set fd [open $::gamefile r+]
while {![eof $fd]} {
lappend list [gets $fd]
}
if {[lindex $list end] == ""} {
set list [lreplace $list end end]
}
lappend list "\[$nick\] <$game> <$code>"
seek $fd 0
puts -nonewline $fd [join $list \n]
close $fd
} else {
putserv "PRIVMSG $nick :Usage: !add <game> <code>"
}
}
bind pub - !find find:nick
proc find:nick {nick uhost hand chan arg} {
global gamefile
set name [lindex [split $arg] 0]
if {$name != ""} {
set fd [open $::gamefile r]
while {![eof $fd]} {
lappend list [gets $fd]
}
close $fd
if {[set le [lsearch -glob $list "*$name*"]] != -1} {
set line [lindex $list $le]
set code [string map {< "" > ""} [lindex $line 2]]
putserv "NOTICE $nick :The code $code belongs to $name."
} else {
putserv "NOTICE $nick :Name not found."
}
} else {
putserv "PRIVMSG $nick :Usage: !find <nick>"
}
}