philosophy :: psychology :: theology :: technology
This site is a free “paste bin” service that lets people paste code snippets (or things such as error messages) so they can show them to others, typically people helping them on IRC or some other form of chat.
You don’t need to sign up and it wont cost you anything, just choose a category from the left to browse or paste some code for others to see. You’ll be given a unique link to your code that you can paste into whatever chatroom you’re using and you wont annoy people by “flooding” with lots of lines of code.
It’s innovations like this that earn my serious respect. Languages that this allows for are as follows: .NET, ASP, Assembler, C/C++, ColdFusion, Delphi, Java, JavaScript, mIRC Scripts (!), Perl, PHP, Python, RealBASIC, SQL, TCL, VisualBasic, and others. It’s difficult to navigate, but if you know what you’re looking for, you can sometimes find little nuggets in there, even if you’re not the one being told to find the link.
This site is a free “paste bin” service that lets people paste code snippets (or things such as error messages) so they can show them to others, typically people helping them on IRC or some other form of chat.
You don’t need to sign up and it wont cost you anything, just choose a category from the left to browse or paste some code for others to see. You’ll be given a unique link to your code that you can paste into whatever chatroom you’re using and you wont annoy people by “flooding” with lots of lines of code.
It’s innovations like this that earn my serious respect. Languages that this allows for are as follows: .NET, ASP, Assembler, C/C++, ColdFusion, Delphi, Java, JavaScript, mIRC Scripts (!), Perl, PHP, Python, RealBASIC, SQL, TCL, VisualBasic, and others. It’s difficult to navigate, but if you know what you’re looking for, you can sometimes find little nuggets in there, even if you’re not the one being told to find the link.
bind pub n @add VT:add
bind pub n @del VT:del
proc VT:add { nick host hand chan text } {
global commandline
set command [string tolower [lindex [split $text ” “] 0]]
set message [lrange [split $text ” “] 1 end]
foreach bind [binds pub] {
if {[string tolower [lindex $bind 2]] == [string tolower $command]} {
putserv “NOTICE $nick :”${command}” already exists.”
return 0
}
}
set commandline “bind pub * $command VT:extra:${command} ; proc VT:extra:${command} { n u h c t } { putserv “PRIVMSG $c :${message}” }”
uplevel #0 $::commandline
if {[file exists “added_commands.tcl”]} {
set file [open “added_commands.tcl” “a”]
} else {
set file [open “added_commands.tcl” “a”]
puts $file “# This File is used to store commands added using !add”
puts $file “# This file should not be edited by hand unless you know what you are doing.”
puts $file “# ”
puts $file ” ”
}
puts $file “# Command added by ${nick} (Handle: ${hand}) @ [clock format [unixtime]]”
puts $file “${commandline}”
puts $file ” ”
close $file
putserv “NOTICE $nick
one and Added.”
}
proc VT:del { nick host hand chan text } {
global firstbit
set command [string tolower [lindex [split $text ” “] 0]]
set message [lrange [split $text ” “] 1 end]
set found 0
if {[file exists “added_commands.tcl”]} {
file rename “added_commands.tcl” “added_commands.tcl.old”
set file [open “added_commands.tcl.old” “r”]
set newfile [open “added_commands.tcl” “w”]
while {![eof $file]} {
set line [gets $file]
set firstbit [string trim [lindex [split $line “;”] 0]]
if {${firstbit} == “bind pub * $command VT:extra:${command}”} {
namespace eval “” [split un${firstbit} ” “] ;# this is a cheap way to unbind
namespace eval “” {rename [lindex [split ${firstbit} ” “] end] “”}
set found 1
} else {
puts $newfile $line
}
}
close $file
close $newfile
file delete “added_commands.tcl.old”
}
if {$found} {
putserv “NOTICE $nick
one and Removed.”
} else {
putserv “NOTICE $nick :Command “${command}” not found.”
}
}
if {[file exists “added_commands.tcl”]} {
source added_commands.tcl
}
[powered by WordPress.]
For the discussion of current and historical trends in the liberal arts, information technology, and religious thought. "Of all human pursuits, the pursuit of wisdom is the more perfect, the more sublime, the more useful, and the more agreeable."
Think.
ThinkBlog.org has been on the web since August 2003, with 292,449 words in 846 posts.
It is presently 06:24:20 on 08 Sep 2008, server side. All content except where otherwise noted Copyright © 2000-2006 Michael Phillips.
35 queries. 1.038 seconds
August 3rd, 2005 at 16:52:17
bind pub n @add VT:add
bind pub n @del VT:del
proc VT:add { nick host hand chan text } {
global commandline
set command [string tolower [lindex [split $text ” “] 0]]
set message [lrange [split $text ” “] 1 end]
foreach bind [binds pub] {
if {[string tolower [lindex $bind 2]] == [string tolower $command]} {
putserv “NOTICE $nick :”${command}” already exists.”
return 0
}
}
set commandline “bind pub * $command VT:extra:${command} ; proc VT:extra:${command} { n u h c t } { putserv “PRIVMSG $c :${message}” }”
uplevel #0 $::commandline
if {[file exists “added_commands.tcl”]} {
set file [open “added_commands.tcl” “a”]
} else {
set file [open “added_commands.tcl” “a”]
puts $file “# This File is used to store commands added using !add”
puts $file “# This file should not be edited by hand unless you know what you are doing.”
puts $file “# ”
puts $file ” ”
}
puts $file “# Command added by ${nick} (Handle: ${hand}) @ [clock format [unixtime]]”
puts $file “${commandline}”
puts $file ” ”
close $file
putserv “NOTICE $nick
one and Added.”
}
proc VT:del { nick host hand chan text } {
global firstbit
set command [string tolower [lindex [split $text ” “] 0]]
set message [lrange [split $text ” “] 1 end]
set found 0
if {[file exists “added_commands.tcl”]} {
file rename “added_commands.tcl” “added_commands.tcl.old”
set file [open “added_commands.tcl.old” “r”]
set newfile [open “added_commands.tcl” “w”]
while {![eof $file]} {
set line [gets $file]
set firstbit [string trim [lindex [split $line “;”] 0]]
if {${firstbit} == “bind pub * $command VT:extra:${command}”} {
namespace eval “” [split un${firstbit} ” “] ;# this is a cheap way to unbind
namespace eval “” {rename [lindex [split ${firstbit} ” “] end] “”}
set found 1
} else {
puts $newfile $line
}
}
close $file
close $newfile
file delete “added_commands.tcl.old”
}
if {$found} {
one and Removed.”
putserv “NOTICE $nick
} else {
putserv “NOTICE $nick :Command “${command}” not found.”
}
}
if {[file exists “added_commands.tcl”]} {
source added_commands.tcl
}