-- http://www.phpmyadmin.net
-- 
-- 
-- Database: `PasteBin`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `pastebin`
-- 

CREATE TABLE `pastebin` (
  `pid` int(11) NOT NULL auto_increment,
  `poster` varchar(24) default NULL,
  `posted` datetime default NULL,
  `code` text,
  `parent_pid` int(11) default '0',
  `lang` varchar(24) default 'None',
  `description` varchar(84) default 'None',
  `channel` varchar(100) default 'None',
  PRIMARY KEY  (`pid`),
  FULLTEXT KEY `code` (`code`),
  FULLTEXT KEY `code_2` (`code`)
) TYPE=MyISAM AUTO_INCREMENT=2645 ;

-- 
-- Dumping data for table `pastebin`
-- 

INSERT INTO `pastebin` VALUES (2497, 'leprechau', '2004-12-15 18:53:57', '## rbl check via dig with scoring system by leprechau@EFnet\r\n## initial release no support or documentation other than provided herein\r\n\r\nif {[namespace exists ::rblchk]} {namespace delete ::rblchk}\r\nnamespace eval ::rblchk {\r\n	namespace export dig check score\r\n\r\n	## begin settings ##\r\n\r\n	variable digbin [lindex [split [exec which dig]] 0]\r\n	## location of dig binary including path (default should work on most systems)\r\n\r\n	variable rbls; array set rbls {\r\n		http.dnsbl.sorbs.net {{Open HTTP Proxy} +2.0}\r\n		socks.dnsbl.sorbs.net {{Open SOCKS Proxy} +2.0}\r\n		misc.dnsbl.sorbs.net {{Open Misc Proxy} +2.0}\r\n		ircbl.ahbl.org {{Abusive Hosts} +2.0}\r\n		blackholes.us {{Problematic Countries} +1.0}\r\n		blackholes.five-ten-sg.com {{Spam Sources, Relays, Dialups, DSL} +1.0}\r\n		cbl.abuseat.org {{Open Proxies and Trojans} +2.0}\r\n		wpbl.dnsbl.net.au {{Weighted Private Block List} +2.0}\r\n		dul.dnsbl.sorbs.net {{Dynamic IPs} -1.0}\r\n	}\r\n	## array of rbls, descriptions, and a score for each\r\n	## format: rblname {{description to show offenders} score}\r\n	## scores must be numeric, but can be either + or - and whole or decimal numbes\r\n\r\n	## end settings ##\r\n	variable version 0.8\r\n\r\n	proc dig {host args} {\r\n		foreach opt {ns type callback} {\r\n			if {[set i [lsearch -glob $args \\-$opt\\*]] != -1} {set [set opt] "[lindex $args [expr {$i +1}]]"; set args [lreplace $args $i [expr {$i +1}]]}\r\n		}\r\n		if {![info exists type]} {set type A}; if {![info exists ns]} {set ns {}} else {set ns "@$ns "}\r\n		if {[catch {set lookup [split [read [set cid [open "|$::rblchk::digbin $ns$host $type" r]]] \\n];close $cid} open_error] != 0} {\r\n			return -code error "Error opening command pipe ($::rblchk::digbin $ns$host $type): $open_error"\r\n		}\r\n		set lookup [lrange $lookup [expr {[lsearch -glob $lookup {*ANSWER SECTION*}]+1}] [expr {[lsearch -glob $lookup {*AUTHORITY SECTION*}]-1}]]\r\n		foreach line $lookup {\r\n			switch -- [lindex $line 3] {\r\n				A {lappend ips [lindex $line end]}\r\n				TXT {lappend txts [lindex $line end]}\r\n				default {continue}\r\n			}\r\n		}\r\n		foreach var {ips txts} {if {![info exists [set var]]} {set [set var] NULL}}\r\n		if {[info exists callback]} {\r\n			switch -- $type {\r\n				A {eval $callback $host [list $ips] $args}\r\n				ANY {eval $callback $host [list $ips] [list $txts] $args}\r\n			}\r\n		} else {\r\n			switch -- $type {\r\n				A {return "$host $ips"}\r\n				ANY {return "$host $ips $txts"}\r\n			}\r\n		}\r\n	}\r\n\r\n	proc check {host rbl args} {\r\n		if {![regexp {^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$} $host]} {\r\n			set host [lindex [lindex [::rblchk::dig $host] 1] 0]\r\n		}\r\n		for {set i 0} {$i < 4} {incr i} {lappend rip [lindex [split $host {.}] end-$i]}\r\n		if {[set i [lsearch -glob $args \\-callback\\*]] != -1} {set callback "[lindex $args [expr {$i +1}]]"; set args [lreplace $args $i [expr {$i +1}]]}\r\n		if {[info exists callback]} {\r\n			eval $callback $host [list [::rblchk::dig [join $rip {.}].$rbl -type ANY]] $args\r\n		} else {return "$host [::rblchk::dig [join $rip {.}].$rbl -type ANY]"}\r\n	}\r\n\r\n	proc score {host args} {\r\n		set total 0; set details [list]\r\n		foreach rbl [array names ::rblchk::rbls] {\r\n			if {(![string equal {NULL} [lindex [set check [::rblchk::check $host $rbl]] 2]]) && (![string equal {NULL} [lindex $check 3]])} {\r\n				set total [expr [subst {$total [set score [lindex $::rblchk::rbls($rbl) end]]}]]\r\n				lappend details [list $score $rbl [lindex $::rblchk::rbls($rbl) 0] [lindex $check end]]\r\n			}\r\n		}\r\n		if {[set i [lsearch -glob $args \\-callback\\*]] != -1} {set callback "[lindex $args [expr {$i +1}]]"; set args [lreplace $args $i [expr {$i +1}]]}\r\n		if {[info exists callback]} {eval $callback [lindex $check 0] [list $details] $total $args} else {return "[lindex $check 0] $details $total]"}\r\n	}\r\n}\r\npackage provide rblchk $::rblchk::version\r\n\r\n## eggdrop extension designed to work with rblchk above both by me (leprechau@EFnet)\r\n## initial release no support or documentation other than provided herein\r\n## to enable this on a channel type: .chanset #channel +rblchk\r\n## other options described below\r\n\r\nif {[namespace exists ::eggrbl]} {namespace delete ::eggrbl}\r\nnamespace eval ::eggrbl {\r\n\r\n	## begin settings ##\r\n\r\n	variable scores; array set scores {\r\n		warn 1.0\r\n		kick 4.0\r\n		kban 5.0\r\n	}\r\n	## points required for warning/kick/kick ban\r\n\r\n	variable warntype "privmsg";\r\n	## warning methond (privmsg or notice)\r\n	## warnings only sent if channel is set +rblmsguser\r\n\r\n	variable adminname "#admin";\r\n	## nick of admin (or channel name) to send details of rblchecks to\r\n	## only works if channel is set +rblchk and +rblmsgadmin\r\n\r\n	variable usertxttrim "0";\r\n	## setting to trim TXT records returned from RBL servers\r\n	## 0 = do not trim\r\n	## 1 = trim all before url\r\n	## 2 = trim url from txt\r\n	## 3 = do not display TXT field\r\n	## There is no point in setting this to ''2'' for user notices\r\n\r\n	variable admintxttrim "3";\r\n	## same settings as ''usertxttrim'' but applies to the admin notices\r\n\r\n	variable exemptflags "";\r\n	## users with the above flags are exempt from checks\r\n	## set to "" to disable exemptions\r\n\r\n	## end settings ##\r\n\r\n	setudef flag rblchck\r\n	setudef flag rblmsgadmin\r\n	setudef flag rblmsguser\r\n	variable version 0.6\r\n\r\n	proc warn {details total uhost ip nick chan warn kick kban} {\r\n		switch -exact -- $::eggrbl::warntype {\r\n			privmsg {set type PRIVMSG}\r\n			notice {set type NOTICE}\r\n			default {set type PRIVMSG}\r\n		}\r\n		if {[channel get $chan rblmsguser]} {\r\n			puthelp "$type $nick :[lindex [split $uhost {@}] end] \\($ip\\) appears in the following dns black list(s)."\r\n			foreach line $details {\r\n				foreach {score rbl desc txt} $line {\r\n					switch -exact -- $::eggrbl::usertxttrim {\r\n						1 {regsub -all -- {^.*http://} $txt {http://} txt}\r\n						2 {regsub -all -- {http://.*$} $txt {} txt}\r\n						3 {set txt {}}\r\n					}\r\n					puthelp "$type $nick :\\002$score\\002 $rbl \\002$desc\\002 $txt"\r\n				}\r\n			}\r\n			puthelp "$type $nick :\\002TOTAL\\002: $total (warning $warn / kick $kick / kban $kban)"\r\n		}\r\n		if {[channel get $chan rblmsgadmin]} {\r\n			puthelp "PRIVMSG $::eggrbl::adminname :RBL \\002$nick!$uhost\\002 \\($ip\\) in \\002$chan\\002 scored \\002$total\\002 point(s)."\r\n			foreach line $details {\r\n				foreach {score rbl desc txt} $line {\r\n					switch -exact -- $::eggrbl::admintxttrim {\r\n						1 {regsub -all -- {^.*http://} $txt {http://} txt}\r\n						2 {regsub -all -- {http://.*$} $txt {} txt}\r\n						3 {set txt {}}\r\n					}\r\n					puthelp "PRIVMSG $::eggrbl::adminname :\\002$score\\002 $rbl \\002$desc\\002 $txt"\r\n				}\r\n			}\r\n		}\r\n	}\r\n\r\n	proc getscore {ip details total uhost nick chan} {\r\n		foreach name [array names ::eggrbl::scores] { set [set name] $::eggrbl::scores($name) }\r\n		if {($total == 0) || ($total < $warn)} {return} elseif {($total >= $warn) && ($total < $kick)} {\r\n			putlog "RBL \\002$nick!$uhost\\002 \\($ip\\) scored \\002$total\\002 points in \\002$chan\\002 \\(warn $warn kick $kick kban $kban\\)"\r\n			::eggrbl::warn $details $total $uhost $ip $nick $chan $warn $kick $kban\r\n		} elseif {($total >= $kick) && ($total < $kban)} {\r\n			putlog "RBL \\002$nick!$uhost\\002 \\($ip\\) scored \\002$total\\002 points in \\002$chan\\002 \\(warn $warn kick $kick kban $kban\\)"\r\n			if {[isop $::botnick $chan]} {\r\n				putserv "KICK $chan $nick :(rblchk) See notice/message for more information."\r\n			} else {putlog "RBL Wanted to kick \\002$nick!$uhost\\002 on \\002$chan\\002 but I do not have ops there."}\r\n			::eggrbl::warn $details $total $uhost $ip $nick $chan $warn $kick $kban\r\n		} elseif {($total >= $kban)} {\r\n			putlog "RBL \\002$nick!$uhost\\002 \\($ip\\) scored \\002$total\\002 points in \\002$chan\\002 \\(warn $warn kick $kick kban $kban\\)"\r\n			if {[isop $::botnick $chan]} {\r\n				putserv "MODE $chan -o+b $nick *!*@$uhost"; putserv "KICK $chan $nick :rblchk v$::rblchk::version + eggrbl v$::eggrbl::version"\r\n			} else {putlog "RBL Wanted to kickban \\002$nick!$uhost\\002 on \\002$chan\\002 but I do not have ops there."}\r\n			::eggrbl::warn $details $total $uhost $ip $nick $chan $warn $kick $kban\r\n		} else { putlog "RBL ERROR: Cannot determine proper action from total score \\($total\\)"; return }\r\n	}\r\n\r\n	proc onjoin {nick uhost hand chan} {\r\n		if {(![channel get $chan rblchck]) || ([string equal -nocase $nick $::botnick]) || \\\r\n		((![string equal {} $::eggrbl::exemptflags]) && ([matchattr $nick $::eggrbl::exemptflags $chan]))} {return}\r\n		::rblchk::score [lindex [split $uhost {@}] end] -callback ::eggrbl::getscore $uhost $nick $chan\r\n	}\r\n	bind join - {* *!*@*} ::eggrbl::onjoin\r\n}\r\npackage provide eggrbl $::eggrbl::version\r\n\r\nputlog "rblchk v$::rblchk::version + eggrbl v$::eggrbl::version by leprechau@EFnet loaded!"\r\n', 0, 'tcl', 'testing', 'none');
INSERT INTO `pastebin` VALUES (2499, 'raidgh0st', '2004-12-17 13:53:32', '\r\n#### Date.tcl by Evo|ver @ ircnet\r\n#### Last update Feb 15 2001\r\n#### \r\n#### Purpose of the script: \r\n#### Storing birthdays and events and checking in how many days it is.\r\n#### The script also sets a topic when it''s someones birthday.i\r\n#### The script CAN use stats.mod for recognising people, but it should\r\n#### work well without it. \r\n#### Use !date --help for all the commands. \r\n####\r\n#### Comments, suggestions, fanmail, marriage proposals: evolver@blue.penguin.nl\r\n####\r\n#### Thanks to HCl for testing.\r\n#### Thanks to webmind for some advise about programming.\r\n#### Thanks to #eggdrop @ircnet for... ehm.. the lame times between sleep.\r\n#### Thanks to G`quann for coding stats.mod\r\n#### Thanks to the people at #mainsource @irc.pulltheplug.com for letting me \r\n#### debug the script with HCl.\r\n####\r\n#### Version 1.2	The year of an event wasn''t handled correctly, it \r\n####			took the current year. This caused a bug for events in \r\n####			future years. ;-)\r\n#### Version 1.1 	Had some putlogs that I used for debugging.. forgot \r\n####			to take them out... \r\n####			With an event, the script now also shows the date...\r\n####			people found that that was usefull....\r\n#### Version 1.0	Releasing the script, tested it for a month, no\r\n####			errors so I thought it could be released.\r\n####			Only some changes in the comment.\r\n#### Version 0.7	Finally found a strange bug.. BitchX adds a " " after\r\n####			a nickcompletion (<tab>).\r\n#### Version 0.6	I think it should be wise if I read the manual. \r\n####			Made a stupid mistake with clock scan.... \r\n#### Version 0.5	It''s know possible to set a time for\r\n####			an event. Changes something in the filetype for it. \r\n####			Fixed a bug, there was no check for the year. So you\r\n####			could just enter no year and you didn''t know nothing \r\n####			happened. :-)\r\n####			If someone''s birthday is today, the script will say that\r\n####			in stead of 52 week... when you do !date. \r\n#### Version 0.4	I forgot something in the help.\r\n####			Script now supports a # in the description of an event.\r\n####			Script now says in the channel when it''s someones \r\n####			birthday and it can''t set the topic.\r\n####			Script now sets the topic back after one day.\r\n#### Version 0.3.5	I didn''t fix the timedate bug, now I did!\r\n#### Version 0.3	Cleaned up a bit of my code.\r\n####			Found and fixed a bug in timedate.\r\n####			Fixed another bug in nick2suser\r\n#### Version 0.2	Fixed a bug with 29 Febuary \r\n####			Fixed a bug in my nick2suser replacement\r\n#### Version 0.1	Initial script. \r\n####			Coded from scratch since my own (non-released)\r\n####			bday.tcl would work anymore with stats.mod1.3.x\r\n####\r\n#### Todo		A warning msg a few days/weeks/months/etc before \r\n#### 			a date. So you can send your birthday card on time ;-)	\r\n#### 			To be really nice, I should make !channel support, \r\n####			but who uses those ;-)\r\n####			There should be more features, if someone has an idea..\r\n\r\n## put here the name of the file where the script stores the data\r\nset datafile .datafile\r\nset notefile .notefile\r\n\r\n## the flag someone must have to be able to remove ALL data. \r\n## NOTE: if someone has the same hostmask of the person who set the date\r\n## he will be able to remove the date too, therefor someone IS able to change\r\n## or remove his/her own birthday or an event he/she set, and someone with \r\n## this flag can always do that.\r\nset date_remove_flag n\r\n\r\n## Don''t change anything below, unless you know what you''re doing.\r\n## All guarentee will be lost when changing anything :-P\r\n\r\nbind pub - !date pub_date\r\n\r\n# Oversetter diverse tid til norsk\r\nproc translate {w00t} {\r\n        set translated [string map {years år year år weeks uker week uke days dager day dag hours timer hour time minutes minutter minute minutt seconds sekunder second sekund} $w00t]\r\n        return $translated\r\n}\r\n\r\n## proc to handle everything with one bind \r\nproc pub_date {nick host hand chan arg} {\r\n	global botnick\r\n	if {[llength $arg] == 0} {\r\n		set reply [getdate [string tolower [nick2suser $nick $chan]]]\r\n		if {[lindex $reply 0] == "pub"} {\r\n			putserv "PRIVMSG $chan :[translate [lrange $reply 1 end]]"\r\n		} else {\r\n			putserv "PRIVMSG $nick :[translate [lrange $reply 1 end]]"\r\n		}	\r\n		return 1\r\n	}\r\n	if {[lindex $arg 0] == "--help"} {\r\n		datehelp $nick\r\n		return 1\r\n	}	\r\n	if {[llength $arg] == 1} {\r\n 		set arg [string trimright $arg " "]\r\n		if {[nick2suser $arg $chan] != "\\*"} {\r\n			set arg [nick2suser $arg $chan]\r\n		}\r\n		set reply [getdate [string tolower $arg]]\r\n		if {[lindex $reply 0] == "pub"} {\r\n			putserv "PRIVMSG $chan :[translate [lrange $reply 1 end]]"\r\n		} else {\r\n			putserv "PRIVMSG $nick :[translate [lrange $reply 1 end]]"\r\n		}	\r\n		return 1\r\n	}\r\n	if {[llength $arg] == 2} {\r\n		if {[lindex $arg 0] == "remove"} {\r\n			putserv "PRIVMSG $nick :[deldate [string tolower [lindex $arg 1]] $nick $host]"\r\n			return 1\r\n		}\r\n		if {[lindex $arg 0] == "whoset"} {\r\n			set reply [whodate [lindex [string tolower $arg] 1]]\r\n			if {[lindex $reply 0] == "pub"} {\r\n				putserv "PRIVMSG $chan :[lrange $reply 1 end]"\r\n			} else {\r\n				putserv "PRIVMSG $nick :[lrange $reply 1 end]"\r\n			}	\r\n			return 1\r\n		}	\r\n		putserv "PRIVMSG $nick :[lindex $arg 0] not a known command. Try !date --help"\r\n		return 1\r\n	}\r\n	if {[llength $arg] == 3} {\r\n		if {[lindex $arg 0] == "-remember"} {\r\n			set targ [lindex $arg 1]\r\n			if {[nick2suser $targ $chan] != "\\*"} {\r\n				set targ [nick2suser $arg $chan]\r\n			}\r\n			putserv "PRIVMSG $nick :[telldate $nick $host [string tolower $targ] [lindex $arg 2]]"	\r\n		}\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [nick2suser $nick $chan]] 00 00 [string toupper [lindex $arg 0]] [lindex $arg 1] [lindex $arg 2] b $nick $host $chan]"\r\n		return 1\r\n	}\r\n	set len [llength [lrange $arg 3 end]]\r\n	set numhash 0\r\n	foreach args [lrange $arg 3 end] {\r\n		if {[regexp (#) $args]} {\r\n			set numhash [expr $numhash + 1]\r\n		}\r\n	}\r\n	if {$numhash == $len} {	\r\n		if {[lsearch [string tolower [lrange $arg 3 end]] $chan] == -1} {\r\n			set chans "[lrange $arg 3 end] $chan"\r\n		} else { \r\n			set chans [lrange $arg 3 end]\r\n		}	\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [nick2suser $nick $chan]] 00 00 [string toupper [lindex $arg 0]] [lindex $arg 1] [lindex $arg 2] b $nick $host $chans]"\r\n		return 1\r\n	}	\r\n	if {[lindex $arg 4] == ""} {\r\n		putserv "PRIVMSG $nick :Please enter a desciption"\r\n		return 0\r\n	}\r\n	if {[regexp {:} [lindex $arg 4]]} { \r\n		regsub {:} [lindex $arg 4] { } time\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [lindex $arg 0]] [lindex $time 1] [lindex $time 0] [string toupper [lindex $arg 1]] [lindex $arg 2] [lindex $arg 3] e $nick $host [lrange $arg 5 end]]" \r\n		return 1\r\n	}\r\n	putserv "PRIVMSG $nick :[setdate [string tolower [lindex $arg 0]] 00 00 [string toupper [lindex $arg 1]] [lindex $arg 2] [lindex $arg 3] e $nick $host [lrange $arg 4 end]]"\r\n	return 1\r\n}	\r\n	\r\n## proc which provides the help \r\n\r\nproc datehelp {nick} {\r\n	global evdatever\r\n	putserv "NOTICE $nick :Help of Date.tcl version $evdatever"\r\n	putserv "NOTICE $nick :To input your birthday: !date <month> <day> <year> \\[other chan\\]"\r\n	putserv "NOTICE $nick :To input an event: !date <event> <month> <day> <year> [time] <description>"\r\n	putserv "NOTICE $nick :<month> like Jan, Feb, etc. The other chans that you can input are chans where I put your birthday in the topic."\r\n	putserv "NOTICE $nick :example 1: You''re birthday is October 2 1981 and you want it in the topic of #foo and #bar (note: I must be ops in those chans to let me set the topic :-)). You say in #foo: !date Oct 2 1981 #bar" \r\n	putserv "NOTICE $nick :example 2: You''re channelmeeting is Febuary 10 2001 at 19:30. You say: !date mychanmeeting Feb 10 2001 19:00 Meeting of #mychan (Note: the time is in an 24-hour clock. 3pm doesn''t work, 15:00 does. The time isn''t necessary, but might be handy :-))" \r\n	putserv "NOTICE $nick :To request a date: !date <birthday\\\\event>"\r\n	putserv "NOTICE $nick :To remove a date: !date remove <birthday\\\\event>"\r\n	putserv "NOTICE $nick :To see who set the date: !date whoset <birthday\\\\event>"\r\n	return 1\r\n}\r\n\r\n## proc for setting the date	\r\nproc setdate {name min hr mm dd yy type snick shost rest} {\r\n	global datafile\r\n	if {[file exists $datafile]} {\r\n		set datedata [open $datafile r]\r\n		while {![eof $datedata]} {\r\n			set curline [gets $datedata]\r\n			if {[lindex $curline 0] == $name} {\r\n				if {$type == "e"} {\r\n					return "Event already known by me. Remove it first to re-input it."\r\n				}\r\n				if {$type == "b"} {\r\n					return "Your birthday is already known by me. Remove it first to re-input it."\r\n				} \r\n				putlog "Somethings wrong... $name is not a birthday AND not an event."\r\n			}\r\n		}\r\n		close $datedata\r\n	}\r\n        regsub -all {[0-9]} $yy {1} myresult\r\n        if {$myresult != 1111} {\r\n        	return "Wrong year. Please use a year like 2001, 1984, 1945, etc."\r\n        }\r\n	set nmm [lsearch "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC" $mm]\r\n	if {$nmm == "-1"} {\r\n		return "Wrong month. Please input a month like: Jan, Feb, Mar, etc..."\r\n	}\r\n	if {[expr $yy % 4] == 0} {\r\n                set days "31 29 31 30 31 30 31 31 30 31 30 31"\r\n        } else {\r\n                set days "31 28 31 30 31 30 31 31 30 31 30 31"\r\n        }\r\n        if {[lindex $days $nmm] < $dd || $dd == 0} {\r\n        	return "Wrong day. There is no $dd th day in $mm."\r\n        }\r\n	regsub -all {[0-9]} $min {1} myresult\r\n	if {$myresult != 11} {\r\n		return "Wrong kind of minutes.... a minute is a number between 00 and 60"\r\n	}\r\n	if {$min >= 60} {\r\n		return "Wrong kind of minutes.... a minute is a number between 00 and 60"\r\n	}\r\n	regsub -all {[0-9]} $hr {1} myresult\r\n	if {$myresult != 11} {\r\n		return "Wrong kind of hours.... an hour is a number between 00 and 24"\r\n	}\r\n	if {$hr >= 24} {\r\n		return "Wrong kind of hours.... an hour is a number between 00 and 24"\r\n	}\r\n## writing the data to the file        \r\n        set datedata [open $datafile a]\r\n        puts $datedata "$name $min $hr $mm $dd $yy $type $snick $shost $rest"\r\n        flush $datedata\r\n        close $datedata\r\n        if {$type == "b"} { \r\n		return "$name ''s birthday is $mm $dd $yy"\r\n	}\r\n	if {$type == "e"} {\r\n		return "$name is $mm $dd $yy at $hr:$min,  $rest"\r\n	}\r\n## if you ever see such a line, you really have a problem :-)\r\n	return "Housten, we have a problem."	\r\n}       \r\n\r\n## proc for finding the date\r\nproc getdate {target} {\r\n	global datafile\r\n	if {![file exists $datafile]} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	set rline ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {		\r\n		set curline [gets $datedata]\r\n		if {[lindex $curline 0] == $target} {\r\n			set rline $curline\r\n		}\r\n	}\r\n	close $datedata\r\n	if {$rline == ""} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	if {[lindex $rline 6] == "b"} {\r\n		set thisyear [lindex [ctime [unixtime]] 4]\r\n	} else {\r\n		set thisyear [lindex $rline 5]\r\n	}\r\n## If someone is born on 29 Feb. you also need a check for that in this proc. Tcl doesn''t like [clock scan "Feb 29 2001"]  :-)\r\n	if {[lindex $rline 3] == "FEB" && [lindex $rline 4] == "29" && (![expr $thisyear %4] == 0) } {\r\n		set thisdate [clock scan "MAR 1 [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n	} else {\r\n		set thisdate [clock scan "[lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1] $thisyear"] \r\n	}\r\n	if {[lindex $rline 6] == "b"} {\r\n		if {$thisdate < [unixtime]} {\r\n			if {[clock scan "[lindex $rline 3] [expr [lindex $rline 4] + 1] [lindex $rline 2]:[lindex $rline 1]  $thisyear"] > [unixtime]} {\r\n				return "pub $target ''s birthday is TODAY!!! $target is now [expr $thisyear - [lindex $rline 5]]" \r\n			} else { \r\n				set thisyear [expr $thisyear + 1]\r\n				if {[lindex $rline 3] == "FEB" && [lindex $rline 4] == "29" && (![expr $thisyear %4] == 0) } {\r\n					set thisdate [clock scan "MAR 1 [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n				} else {\r\n					set thisdate [clock scan "[lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n				}\r\n			}\r\n		}\r\n		return "pub $target ''s bursdag er om [duration \r\n[expr \r\n$thisdate - [unixtime]]]. $target will be [expr $thisyear - [lindex $rline 5]]"\r\n	} else {\r\n		if {$thisdate < [unixtime]} {\r\n			return "pub $target was [duration [expr [unixtime] - $thisdate]] ago. ([lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1]) [lrange $rline 9 end]." \r\n		} else {\r\n			return "pub $target is in [duration [expr $thisdate - [unixtime]]]. ([lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1]) [lrange $rline 9 end]." \r\n		}\r\n	}\r\n## Next line is a quote from "Something''s wrong" from K''s Choice	\r\n	return "msg Your pubic hair ''s on fire!"\r\n}\r\n\r\n## proc for deleting date\r\nproc deldate {target nick host} {\r\n	global datafile date_remove_flag\r\n	if {![file exists $datafile]} {\r\n		return "$target is not set \\/ $target has no birthday set"\r\n	}\r\n	set dates ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {\r\n		set curline [gets $datedata]\r\n		if {$curline != ""} {\r\n			set dates [linsert $dates end $curline]\r\n		}\r\n	}\r\n	close $datedata\r\n	set line "-1"\r\n	set checkthis ""\r\n	foreach date $dates {\r\n		set line [expr $line + 1]\r\n		if {[lindex $date 0] == $target} {\r\n			set checkthis $date\r\n			break\r\n		}\r\n	}\r\n	if {$checkthis == "" } {return "$target is not set \\/ $target has no birthday set"}\r\n	if {[maskhost $host] == [maskhost [lindex $date 8]] || [matchattr [nick2hand $nick] $date_remove_flag]} {\r\n		if {[expr $line >= 0] && [expr $line < [llength $dates]]} {\r\n			set newdata [lreplace $dates $line $line]\r\n			set datedata [open $datafile w]\r\n			foreach newdate $newdata {\r\n				puts $datedata $newdate\r\n			}\r\n			flush $datedata\r\n			close $datedata\r\n			return "$target is deleted"\r\n		} \r\n	} \r\n	putlog "You are not allowed to remove that date."\r\n}\r\n\r\n## proc wich looks everyday for a birthday\r\nbind time - "00 00 * * *" timedate\r\nproc timedate {min hr day month year} {\r\n	global datafile evdtopics\r\n	if {![file exists $datafile]} {\r\n		return 0\r\n	}\r\n	set dates ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {\r\n		set curline [gets $datedata]\r\n		if {$curline != ""} {\r\n			set dates [linsert $dates end $curline]\r\n		}\r\n	}\r\n	close $datedata\r\n	set bdays ""\r\n	foreach date $dates {		\r\n		if {[lindex $date 6] == "b"} {\r\n			if {[string trimleft $day 0] == [string trimleft [lindex $date 4] 0]} {\r\n				set month [string trimleft $month 0]\r\n				if {$month == ""} {set month 0}\r\n				set mnth [lindex "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC" $month]\r\n				if {$mnth == [string toupper [lindex $date 3]]} {\r\n					set bdays [linsert $bdays end $date]\r\n				}\r\n			}	\r\n		}\r\n	}\r\n	if {$bdays == ""} {return 0}\r\n	set chans ""\r\n	foreach bday $bdays {\r\n		foreach chan [lrange $bday 9 end] {\r\n			lappend name($chan) "[lindex $bday 0],"\r\n			lappend age($chan) "[expr $year - [lindex $bday 5]],"\r\n		}\r\n	}\r\n	foreach chan [array names name] {\r\n		if {[llength $name($chan)] == 1} {\r\n			putserv "TOPIC $chan :[string trimright $name($chan) ,] ''s birthday! [string trimright $name($chan) ,] is now [string trimright $age($chan) ,]"\r\n			return 1\r\n		}\r\n		if {(![regexp {t} [lindex [getchanmode $chan] 0]]) || [botisop $chan]} {	\r\n			set evdtopics($chan-b) [topic $chan]\r\n			putserv "TOPIC $chan :Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!" \r\n			set evdtopics($chan-a) "Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!"\r\n			timer 1438 "evdresettopic $chan"\r\n		} else {\r\n			putserv "PRIVMSG $chan :\\002Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!\\002" \r\n		}\r\n	}	\r\n}	\r\n\r\nproc evdresettopic {chan} {\r\n	global evdtopics\r\n	putlog "[topic $chan] == $evdtopics($chan-a)"\r\n	if {"[topic $chan]" == "$evdtopics($chan-a)"} {\r\n		putserv "TOPIC $chan :$evdtopics($chan-b)"\r\n	}\r\n}		\r\n	\r\n## proc which looksup who set the date\r\nproc whodate {target} {\r\n	global datafile\r\n	if {![file exists $datafile]} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	set rline ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {		\r\n		set curline [gets $datedata]\r\n		if {[lindex $curline 0] == $target} {\r\n			set rline $curline\r\n		}\r\n	}\r\n	close $datedata\r\n	if {$rline == ""} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	return "pub $target was set by [lindex $rline 7]![lindex $rline 8]"\r\n}	\r\n\r\nproc telldate {nick host target when} {\r\n	global datafile notefile\r\n}\r\n\r\n\r\n## proc which is called if you don''t run stats.mod 1.3.* \r\n## I use the tcl-command from stats.mod because it autoadds hostnames.\r\nset modcheck "1"\r\nforeach mod [modules] {\r\n	if {[lindex $mod 0] == "stats" && [lindex $mod 1] >= 1.3} {set modcheck "0"} \r\n}\r\nif {$modcheck} {\r\n	proc nick2suser {nick chan} {\r\n		if {[nick2hand $nick $chan] == "\\*" || [nick2hand $nick $chan] == ""} {\r\n			return $nick\r\n		} else {\r\n			return [nick2hand $nick $chan]\r\n		}\r\n	}\r\n}\r\n	\r\n\r\nset evdatever "1.2"\r\nputlog "Date.tcl version $evdatever by Evo|ver loaded"	', 0, 'tcl', 'norwegian answer', '#EggTCL');
INSERT INTO `pastebin` VALUES (2503, 'sk8save', '2004-12-17 19:44:22', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r\n	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n\r\n<html>\r\n<head>\r\n<title>Untitled</title>\r\n<style media="screen" type="text/css">\r\n	body{font-family: Arial, Verdana, Helvetica, serif;}\r\n	#page{width: 760px;}\r\n	#menu{float: left; width: 175px;}\r\n	#content{float: right; width: 585px;}\r\n	\r\n	#menu ul{margin: 0; padding: 0; list-style-type: none;}\r\n	#menu ul li a{display: block; background-image: url(list_bg.gif); background-repeat: no-repeat; width: 100%;}\r\n	#menu ul li a span.text{display: none;}\r\n	#menu ul li a span.img{background-image: url(list_item_1.gif); background-repeat: no-repeat;}\r\n</style> \r\n</head>\r\n\r\n<body>\r\n<div id="page">\r\n	<div id="header">\r\n	\r\n	</div>\r\n	\r\n	<div id="main">\r\n		<div id="menu">\r\n			<div class="pad">\r\n				<ul>\r\n					<li><a href=""><span class="text">Fabulous Finds</span><span class="img"></span></a></li>\r\n				</ul>\r\n			</div>\r\n		</div>\r\n		\r\n		<div id="content">\r\n			<div id="pad">\r\n				Test\r\n			</div>		\r\n		</div>\r\n	</div>\r\n\r\n\r\n</div>\r\n\r\n\r\n</body>\r\n</html>\r\n\r\n', 0, 'html', 'Current Code', 'none');
INSERT INTO `pastebin` VALUES (2502, 'giorgos', '2004-12-17 19:34:52', '\r\n/**\r\n * Write a description of class Board here.\r\n * \r\n * @author (your name) \r\n * @version (a version number or a date)\r\n */\r\npublic class Board\r\n{\r\n    private static char[][] boardArray;\r\n\r\n\r\n    public Board()\r\n    {\r\n        boardArray = new char[5][5];\r\n    }\r\n    \r\n    public char getValue(int x, int y)\r\n    {\r\n        return boardArray[x][y];\r\n    }\r\n    \r\n    public char getLeft(int x, int y){\r\n          return boardArray[x-1][y];\r\n    }\r\n    \r\n    public char get2Left(int x, int y){    \r\n          return boardArray[x-2][y];\r\n    }\r\n    \r\n    public char getRight(int x, int y){\r\n          return boardArray[x+1][y];\r\n\r\n    }\r\n    \r\n    public char get2Right(int x, int y){\r\n          return boardArray[x+2][y];\r\n    }\r\n    \r\n    public char getTop(int x, int y){\r\n          return boardArray[x][y+1];\r\n    }    \r\n    \r\n    public char getBottom(int x, int y){\r\n          return boardArray[x][y-1];\r\n    }        \r\n    \r\n    public static void insertPiece(char piece, int x, int y){\r\n          boardArray[x][y] = piece;\r\n    }    \r\n    \r\n    public boolean isFree(int x, int y){\r\n        if(boardArray[x][y] == ''z''){ \r\n            return true;\r\n        } else {\r\n            return false;\r\n        }\r\n    }\r\n    \r\n    public static void initializeboard(String linefromfile){\r\n        int x, y;\r\n        int z = 1;\r\n        for(x=1; x < 5; x++){\r\n            for(y=1; y < 5; y++){\r\n                insertPiece(linefromfile.charAt(z),y,x);\r\n                z++;\r\n            }\r\n        }    \r\n    }\r\n}\r\n', 0, 'java', 'none', 'none');
INSERT INTO `pastebin` VALUES (2494, 'joe-', '2004-12-12 10:06:09', 'proc kzCup:LogReader {} {\r\n	global conf\r\n	set JumpCupTimer [utimer 1 "kzCup:LogReader"]\r\n	if {$conf(size_log) < [file size $conf(files_logfile)]} {\r\n		set of [open $conf(files_logfile) r]\r\n		seek $of $conf(size_log)\r\n		while {![eof $of]} {\r\n			set line [gets $of]\r\n			if {$line == ""} { continue; }\r\n			lappend lines $line\r\n		}\r\n		set conf(size_log) [file size $conf(files_logfile)]\r\n		close $of\r\n	} else {\r\n		return 0\r\n	}\r\n\r\n	foreach line [split $lines \\n] {\r\n		if {[regexp {: \\"(.*)<\\d+><(.*)><.*>\\" say \\"(.*?)\\"} $line "" nick steamid text]} {\r\n			if {[kzCup:ServerCheckIfUserIsAdmin $steamid]} { kzCup:CheckServerCommand $nick "$text" }\r\n		}\r\n	}\r\n}\r\n', 0, 'none', 'LogReader', 'none');
INSERT INTO `pastebin` VALUES (2495, 'BL4DE', '2004-12-12 10:12:51', 'if {![info exists utimersrunning]} {\r\n  set utimersrunning 1\r\n  utimer 1 [list kzCup:LogReader]\r\n}', 0, 'tcl', 'proper wat', '#EggTCL');
INSERT INTO `pastebin` VALUES (2496, 'BL4DE', '2004-12-12 10:44:44', 'proc kzCup:LogReader {} {\r\n	global conf\r\n	set JumpCupTimer [utimer 1 "kzCup:LogReader"]\r\n	if {$conf(size_log) < [file size $conf(files_logfile)]} {\r\n		set of [open $conf(files_logfile) r]\r\n		seek $of $conf(size_log)\r\n		while {![eof $of]} {\r\n			set line [gets $of]\r\n			if {$line == ""} { continue; }\r\n			lappend lines $line\r\n		}\r\n		set conf(size_log) [file size $conf(files_logfile)]\r\n		close $of\r\n		foreach line [split $lines \\n] {\r\n			if {[regexp {: \\"(.*)<\\d+><(.*)><.*>\\" say \\"(.*?)\\"} $line "" nick steamid text]} {\r\n				if {[kzCup:ServerCheckIfUserIsAdmin $steamid]} { kzCup:CheckServerCommand $nick "$text" }\r\n			}\r\n		}\r\n	}\r\n	utimer 1 [list kzCup:LogReader]\r\n}\r\n\r\nif {![info exists utimersrunning]} {\r\n	set utimersrunning 1\r\n	utimer 1 [list kzCup:LogReader]\r\n}', 2494, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2488, 'Barvaz', '2004-12-10 06:21:41', 'Tracing route to irc.homelien.no [2001:840:0:1000:1::1]\r\nover a maximum of 30 hops:\r\n\r\n  1   273 ms   276 ms   266 ms  gw-875.ham-01.de.sixxs.net [2001:6f8:900:36a::1]\r\n  2   276 ms   280 ms   277 ms  fe1-0-536.6r0.isham.de.easynet.net [2001:6f8:800:1003::209:55]\r\n  3   273 ms   273 ms   267 ms  ge0-0-0-31.br1.isham.de.easynet.net [2001:6f8:892:4::1:11]\r\n  4   279 ms   281 ms   274 ms  so0-1-0-0.br0.ixfra.de.easynet.net [2001:6f8:800::51:2:1]\r\n  5   268 ms   268 ms   274 ms  fe1-0.6er0.ixfra.de.easynet.net [2001:6f8:888:5::10:40]\r\n  6   279 ms   281 ms   277 ms  de-cix.fra10.ip6.tiscali.net [2001:7f8::cb9:0:1]\r\n  7   288 ms     *      283 ms  so-0-0-0.fra40.ip6.tiscali.net [2001:668:0:2::1c0]\r\n  8   283 ms   281 ms   293 ms  so-5-0-0.dus10.ip6.tiscali.net [2001:668:0:2::70]\r\n  9   286 ms   290 ms   286 ms  so-0-0-0.ham10.ip6.tiscali.net [2001:668:0:2::101]\r\n 10   296 ms   295 ms   295 ms  so-1-0-0.cph20.ip6.tiscali.net [2001:668:0:2::3e1]\r\n 11   299 ms   301 ms   297 ms  so-2-0-0.cph10.ip6.tiscali.net [2001:668:0:2::160]\r\n 12   297 ms   285 ms   286 ms  so-2-0-0.osl20.ip6.tiscali.net [2001:668:0:2::150]\r\n 13   281 ms   295 ms   290 ms  so-0-0-0.osl11.ip6.tiscali.net [2001:668:0:2::140]\r\n 14   289 ms   295 ms   298 ms  2001:7f8:12:1::1:6186\r\n 15     *        *        *     Request timed out.\r\n 16     *        *        *     Request timed out.\r\n 17     *        *        *     Request timed out.\r\n 18     *        *        *     Request timed out.\r\n 19     *        *        *     Request timed out.\r\n 20     *        *        *     Request timed out.\r\n 21     *        *        *     Request timed out.\r\n 22     *        *        *     Request timed out.\r\n 23     *        *        *     Request timed out.\r\n 24     *        *        *     Request timed out.\r\n 25     *        *        *     Request timed out.\r\n 26     *        *        *     Request timed out.\r\n 27     *        *        *     Request timed out.\r\n 28     *        *        *     Request timed out.\r\n 29     *        *        *     Request timed out.\r\n 30     *        *        *     Request timed out.\r\n\r\nTrace complete.', 0, 'none', 'irc.homelien.no tracert', 'none');
INSERT INTO `pastebin` VALUES (2489, 'rgak', '2004-12-10 21:24:25', 'dont laugh its my fisrt attempt, i need sum cod taht froma publicd mcd will add data into my sqp db, and display a msg in channel saying wat they added was added.\r\n\r\n### mysql settings ###\r\n\r\nset mysql(host) "localhost"\r\n# hostname of the mysql server\r\nset mysql(dbase) "zeromovies"\r\n# name of the zeromovies\r\nset mysql(user) "rgakbo"\r\n# name of the mysql user\r\nset mysql(pass) "162345"\r\n# password for the mysql user\r\nset mysql(fbsql) "fbsql.so"\r\n# path to the fbsql.so tcl mysql api\r\n\r\n### other settings ###\r\n\r\nset invite(cmd) "!invite"\r\n# message command to use\r\nset invite(chan) "#testing123"\r\n# channel to invite to\r\n\r\n### end settings ###\r\n\r\n# lets load fbsql tcl mysql api if it is not already loaded\r\nif {![string match *sql* [info commands]]} { catch {load $mysql(fbsql)} }\r\n\r\n# lets initialize our sqlsessions (see next proc for how sessions are managed)\r\nif {(![info exists sqlsession]) || ($sqlsession > 10)} { set sqlsession 0 }\r\n\r\n# now, lets make a nice proc to take advantage of the fbsql sessions\r\nproc pubAdd {nick uhost hand chan text} {\r\nglobal mysql sqlsession\r\n   $sqlcmd "insert into title}\r\nbind pub - !add pubAdd\r\nputlog "#$nick# addedÂ”\r\n{$sqlcmd disconnect}\r\n\r\n\r\nplz help\r\n', 0, 'tcl', 'tc;', '#TCL');
INSERT INTO `pastebin` VALUES (2491, 'rgak', '2004-12-11 08:49:45', '\r\nset file "reqs.txt"\r\n\r\n### so the words will be saved into the arrays\r\nproc start:read {} {\r\nglobal cwd file\r\n  if {[file exist $file]} {\r\n    set fs [open $file r] \r\n    while {![eof $fs]} { \r\n       gets $fs line; set $line [join $line]\r\n         if {[llength $line] >= 2 } {\r\n            set wchan [lrange $line 0 0]\r\n            if {![info exist cwd($wchan)]} { set disc [lrange $line 1 end]; set cwd($wchan) "$disc" }\r\n         }\r\n    }  \r\n    close $fs \r\n  }\r\n}\r\n### Every minute the arrays will be saved into the file with the name $file\r\nproc start:read {} {\r\nglobal cwd file\r\n  if {[file exist $file]} {\r\n    set fs [open $file r] \r\n    while {![eof $fs]} { \r\n       gets $fs line; set $line [join $line]\r\n         if {[llength $line] >= 2 } {\r\n            set wchan [lrange $line 0 0]\r\n            if {![info exist cwd($wchan)]} { set disc [lrange $line 1 end]; set cwd($wchan) "$disc" }\r\n         }\r\n    }  \r\n    close $fs \r\n  }\r\n}\r\n\r\n\r\n\r\nbind pub-add - -add \r\nproc -add { nick uhost hand chan arg } { \r\n    global chan_ign\r\nset args [join $args]\r\nset word [lrange $args 0 0]\r\nset disc [join [lrange $args 1 end]]\r\nset channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]\r\n if {[lsearch $chan_ign $channel] < "0" } {\r\n  if {$word == ""} {\r\n     putserv "NOTICE $nick :You forgot the word! \\037Syntax: \\002.add <word> <discription>\\002\\037"\r\n  } elseif {$disc == ""} {\r\n     putserv "NOTICE $nick :You forgot the discription! \\037Syntax: \\002.add <word> <discription>\\002\\037"\r\n  } else {\r\n     global cwd\r\n     set cwd($word$channel) "$disc"\r\n     putserv "NOTICE $nick :Added succesfully the word \\002$word\\002 in the channel \\002$channel\\002 with the discription: \\002$disc\\002"\r\n  }\r\n } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }\r\n}\r\n\r\n\r\nis there sumthing wrong with this cause it wont load.', 0, 'tcl', 'code problem', 'none');
INSERT INTO `pastebin` VALUES (2492, 'rgak', '2004-12-11 09:41:47', '\r\nset file "reqs.txt"\r\n\r\nbind pub m|m .add pub:add\r\nbind pub m|m .del pub:del\r\nbind pub - ?? pub:check\r\nbind pub m|m .list pub:list\r\nbind pub m|- .globadd pub:globaladd\r\nbind pub m|- .globdel pub:globaldel\r\nbind time - "* * * * *" start:save\r\n\r\n### so the words will be saved into the arrays\r\nproc start:read {} {\r\nglobal cwd file\r\n  if {[file exist $file]} {\r\n    set fs [open $file r] \r\n    while {![eof $fs]} { \r\n       gets $fs line; set $line [join $line]\r\n         if {[llength $line] >= 2 } {\r\n            set wchan [lrange $line 0 0]\r\n            if {![info exist cwd($wchan)]} { set disc [lrange $line 1 end]; set cwd($wchan) "$disc" }\r\n         }\r\n    }  \r\n    close $fs \r\n  }\r\n}\r\n### Every minute the arrays will be saved into the file with the name $file\r\nproc start:save {mi ho da mo ye} {\r\nglobal cwd file\r\nset fs [open $file w+]\r\nset total "[llength [array names cwd]]"\r\n    foreach array_id [array names cwd] {\r\n       if {$cwd($array_id) != ""} {\r\n          set disc "$cwd($array_id)";\r\n          puts $fs "$array_id $disc"\r\n       }\r\n    }\r\nclose $fs\r\nputcmdlog "UPDATE: \\002$total\\002 words saved in the file \\002$file\\002."\r\n}\r\n\r\nproc pub:add { nick username handle channel args } {\r\nglobal chan_ign\r\nset args [join $args]\r\nset word [lrange $args 0 0]\r\nset disc [join [lrange $args 1 end]]\r\nset channel [string tolower $channel]; set chan_ign [string tolower $chan_ign]\r\n if {[lsearch $chan_ign $channel] < "0" } {\r\n  if {$word == ""} {\r\n     putserv "NOTICE $nick :You forgot the word! \\037Syntax: \\002.add <word> <discription>\\002\\037"\r\n  } elseif {$disc == ""} {\r\n     putserv "NOTICE $nick :You forgot the discription! \\037Syntax: \\002.add <word> <discription>\\002\\037"\r\n  } else {\r\n     global cwd\r\n     set cwd($word$channel) "$disc"\r\n     putserv "NOTICE $nick :Added succesfully the word \\002$word\\002 in the channel \\002$channel\\002 with the discription: \\002$disc\\002"\r\n  }\r\n } else { putserv "NOTICE $nick :This channel is ignored for using the DictionarySystem. Please take contact with the owner of this bot." }\r\n}\r\n\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2493, 'rgak', '2004-12-11 14:54:01', '#########################################################################\r\n# Chilla''s IMDb info script\r\n# \r\n##\r\n# Version: 20040110 - changed script to use new query string and parse\r\n#                     new IMDb search results page - NetRipper\r\n##\r\n# Notes for this version: Thanks to 2dee for showing me his\r\n# imdb site update fix. Thanks to TotaLGaZ for his help.\r\n# Thanks to Chilla and FAN for their work on this brilliant script.\r\n# Would like to make the options selectable from the partyline and also\r\n# add a disable trigger in channel(both specific and global) option. Who \r\n# knows might get round to it one day but if anyone else wants to then it \r\n# will save me a job.\r\n##\r\n# Version: 20030014 - works with updated imdb site, new option of public\r\n# or notice response to chan triggers.\r\n# - GQsm http://forum.egghelp.org\r\n##\r\n# Version: 20020604 - fixed misc http/html stuff, added msg command - FAN\r\n##\r\n# Version: 20011031 - - Chilla\r\n#########################################################################\r\n\r\n\r\n# base imdb url, to which you can append "/Title?######" or whatever\r\nset imdburl "http://www.imdb.com"\r\n\r\n# the imdb search script\r\nset imdbsearchurl "http://www.imdb.com:80/find?"\r\n\r\n# 1 for each of these means that the respective values will ALWAYS show\r\n# and that command options for these will be disregarded\r\n# leave zero to keep them an option at the command line\r\nset show_rating 1 \r\nset show_genre 1\r\nset show_tagline 1\r\nset show_outline 0\r\nset show_cast 0\r\n\r\n# for a channel !imdb request\r\n# set to 1 = title ,rating, genre and tagline(if selected) will be displayed\r\n# publicly to the channel\r\n# set to 0 = all results will be sent as private notice\r\nset pub_or_not 1\r\n\r\n#########################################################################\r\n# DO NOT MODIFY BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!\r\n#########################################################################\r\n\r\nset DEBUG 0\r\nset imdbVERSION 20040110\r\nset b_agent "MSIE 6.0" \r\n\r\n# If you are getting http error messages, try uncommentign this next line:\r\n#package forget http\r\npackage require http 2.3\r\n\r\nbind pub -|- !imdb imdb_handler\r\nbind msg -|- !imdb imdb_msghandler\r\n\r\nproc imdb_handler { nick uhost hand chan args } {\r\n	global DEBUG imdbVERSION imdburl imdbsearchurl b_agent\r\n	global show_rating show_genre show_tagline show_outline show_cast\r\n	global pub_or_not\r\n\r\n   # How do you want your results ? chan or priv\r\n	if {$pub_or_not == 1 } {\r\n	set toput "PRIVMSG $chan"\r\n	} else {\r\n	set toput "NOTICE $nick"\r\n	}\r\n\r\n          # set to defaults\r\n		set o_rating $show_rating \r\n		set o_genre $show_genre \r\n		set o_tagline $show_tagline\r\n		set o_outline $show_outline \r\n		set o_cast $show_cast\r\n\r\n\r\n		set checkargs [string trim $args " \\n"]\r\n\r\n		# if no arguments passed, show help\r\n		if {[string compare $checkargs "{}"] == 0} {\r\n			putserv "NOTICE $nick : IMDb info script v$imdbVERSION  -  7General Help "\r\n			putserv "NOTICE $nick : 14<===========================================> "\r\n			putserv "NOTICE $nick : 7!imdb \\[options\\] <imdb title>"\r\n			putserv "NOTICE $nick : 7options: -r     ratings" \r\n			putserv "NOTICE $nick : 7         -g     genre" \r\n			putserv "NOTICE $nick : 7         -t     tagline" \r\n			putserv "NOTICE $nick : 7         -o     plot outline" \r\n			putserv "NOTICE $nick : 7         -c     cast" \r\n			putserv "NOTICE $nick : 7Example: !imdb -o -c Beautiful Mind" \r\n			return	\r\n		} \r\n\r\n	# Look for command line options and enable each, as desired\r\n	set fargs ""\r\n		set imdbtitle ""\r\n		foreach piece [split $args " "] {\r\n			set piece	[string trim $piece "{}"]\r\n				if {[string compare $piece "-r"] == 0 } {\r\n					set o_rating 1\r\n				} elseif {[string compare $piece "-g"] == 0 } {\r\n					set o_genre 1\r\n				} elseif {[string compare $piece "-t"] == 0 } {\r\n					set o_tagline 1\r\n				} elseif {[string compare $piece "-o"] == 0 } {\r\n					set o_outline 1\r\n				} elseif {[string compare $piece "-c"] == 0 } {\r\n					set o_cast 1\r\n				} else {\r\n					set fargs "$fargs $piece"\r\n				}\r\n		}\r\n        #set fargs [string trimleft $args]\r\n	if {$DEBUG == 1} {\r\n		putserv "NOTICE $nick :I am doing a search for \\"$fargs\\" on imdb.com"\r\n	}\r\n\r\n	set query $fargs\r\n\r\n		# do initial search\r\n		set searchString [ ::http::formatQuery $query ] \r\n                set searchString [string trimleft $searchString "+"]		\r\n                if {$DEBUG == 1} {\r\n		 putserv "NOTICE $nick :searchString: \\"$searchString\\""		\r\n		}\r\n                set page [::http::config -useragent $b_agent]\r\n		set page [::http::geturl ${imdbsearchurl}q=${searchString}&sort=smart&tv=off]\r\n\r\n		set redirect 0\r\n		set newurl ""\r\n\r\n		set lines [split [::http::data $page] \\n]\r\n		set numLines [llength $lines]\r\n\r\n		for {set i 0} {$i < $numLines} {incr i 1} {\r\n			set line [lindex $lines $i]\r\n				#if redirect necessary, find first link and redirect\r\n                                #putserv "NOTICE $nick : $line"\r\n				if {[string match "*title search*" $line]} {\r\n					set redirect 1\r\n		                        #putserv "NOTICE $nick : redirect 1"\r\n						for {} {$i < $numLines} {incr i 1} {\r\n							set line [lindex $lines $i]\r\n								if {[string match -nocase "*1.&#160;*" $line]} {\r\n									regexp href=\\"\\[^\\"\\]*\\" $line title\r\n										set title [string range $title 6 [expr [string length $title] - 2]] \r\n										append newurl $imdburl $title\r\n	\r\n										# get the page redirected to\r\n										set page [::http::config -useragent $b_agent]\r\n										set page [::http::geturl ${newurl}]\r\n										set lines [split [::http::data $page] \\n]\r\n								}\r\n						}\r\n					set i $numLines\r\n				}\r\n		}\r\n\r\n	# if no redirect happened, then get first page on match\r\n\r\n	if {$redirect == 0} {\r\n		upvar 0 $page oldpage\r\n			regexp Location\\ \\[^\\ \\]*\\ Connection $oldpage(meta) location\r\n		        #putserv "NOTICE $nick : $oldpage(meta)"                        \r\n			set newurl [string range $location 9 [expr [string length $location] - 12]]\r\n			set page [::http::config -useragent $b_agent]\r\n			set page [::http::geturl ${newurl}]\r\n			set lines [split [::http::data $page] \\n]\r\n	}\r\n\r\n	# for bogus searches\r\n	if {[string length $newurl] == 0} {\r\n		putserv "NOTICE $nick :No no no! I can''t find that!"\r\n			return\r\n	}\r\n\r\n	set numLines [llength $lines]\r\n\r\n	# scan for wanted data from the page\r\n		for {set i 0} {$i < $numLines} {incr i 1} {\r\n			set line [lindex $lines $i]\r\n				if {[string compare -length 7 $line "<title>"] == 0} {\r\n					# the movie title, year, url\r\n					set title [string range $line 7 [expr [string length $line] - 9]]\r\n						set title [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $title]\r\n						putserv "$toput : $title  \\( $newurl \\)"\r\n				} elseif {($o_tagline == 1) && ([regexp \\[.\\]*Tagline:\\[.\\]* $line] > 0)} {\r\n					# the tagline\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" tagline\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $tagline "" tagline \r\n						regsub -all \\[\\ \\t\\]+ $tagline " " tagline \r\n						regsub -all \\&nbsp\\; $tagline " " tagline\r\n						set tagline [string trim $tagline " "]\r\n						set tagline [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $tagline]\r\n						putserv "$toput :$tagline"\r\n				} elseif {($o_outline == 1) && ([regexp \\[.\\]*Outline:\\[.\\]* $line] > 0)} {\r\n					# the outline\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" outline\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $outline "" outline \r\n						regsub -all \\[\\ \\t\\]+ $outline " " outline \r\n						regsub -all \\&nbsp\\; $outline " " outline\r\n						set outline [string trim $outline " "]\r\n						set outline [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $outline]\r\n						putserv "NOTICE $nick :$outline"\r\n				} elseif {($o_genre == 1) && ([regexp \\[.\\]*Genres\\[.\\]* $line] > 0)} {\r\n					# the genre\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" genre\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $genre "" genre\r\n						regsub -all \\[\\ \\t\\]+ $genre " " genre\r\n						set genre [string trim $genre " "]\r\n						set genre "Genre: $genre"\r\n						putserv "$toput :$genre"\r\n				} elseif {($o_rating == 1) && ([regexp \\[.\\]*User\\ Rating\\[.\\]* $line] > 0)} { \r\n					# the user rating \r\n					set j [expr $i + 3] \r\n					set line2 [lindex $lines $j] \r\n					set j [expr $i + 4] \r\n					set line3 [lindex $lines $j] \r\n					regsub -all \\<\\[^\\>\\]*\\> $line3 "" rating \r\n						regsub -all \\&nbsp\\; $rating " " rating \r\n						regsub -all \\[\\ \\t\\]+ $rating " " rating \r\n						set rating [string trim $rating " "] \r\n						set goldstars [regexp -all goldstar $line2] \r\n						set greystars [expr 10 - $goldstars] \r\n					\r\n						# generating the rating bar \r\n						set marker "*" \r\n						set rating_bar " 11\\[ 7" \r\n						for {set i2 0} {$i2 < $goldstars} {incr i2 1} { \r\n							set rating_bar "$rating_bar$marker" \r\n						} \r\n					set marker "-" \r\n						set rating_bar "$rating_bar 14" \r\n						for {set i3 0} {$i3 < $greystars} {incr i3 1} { \r\n							set rating_bar "$rating_bar$marker" \r\n						} \r\n					set rating_bar "$rating_bar 11\\] " \r\n						putserv "$toput :$rating $rating_bar"\r\n				} elseif {($o_cast == 1) && ([regexp \\[.\\]*\\\\\\.\\\\\\.\\\\\\.\\\\\\.\\[.\\]* $line] > 0)} {\r\n\r\n					if {[regexp Name $line] > 0} {\r\n						regsub -all \\<\\[^\\>\\]*\\> $line "" cast\r\n						set cast [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $cast]\r\n		                                set checkargs [string trim $args " \\n"]						\r\n							putserv "NOTICE $nick :$cast"\r\n					}\r\n				}\r\n		}\r\n\r\n}\r\n\r\nproc imdb_msghandler { nick uhost hand args } {\r\n	global DEBUG imdbVERSION imdburl imdbsearchurl b_agent\r\n	global show_rating show_genre show_tagline show_outline show_cast\r\n\r\n          # set to defaults\r\n		set o_rating $show_rating \r\n		set o_genre $show_genre \r\n		set o_tagline $show_tagline\r\n		set o_outline $show_outline \r\n		set o_cast $show_cast\r\n\r\n		set checkargs [string trim $args " \\n"]\r\n\r\n		# if no arguments passed, show help\r\n		if {[string compare $checkargs "{}"] == 0} {\r\n			putserv "PRIVMSG $nick : IMDb info script v$imdbVERSION  -  7General Help "\r\n			putserv "PRIVMSG $nick : 14<===========================================> "\r\n			putserv "PRIVMSG $nick : 7!imdb \\[options\\] <imdb title>"\r\n			putserv "PRIVMSG $nick : 7options: -r     ratings" \r\n			putserv "PRIVMSG $nick : 7         -g     genre" \r\n			putserv "PRIVMSG $nick : 7         -t     tagline" \r\n			putserv "PRIVMSG $nick : 7         -o     plot outline" \r\n			putserv "PRIVMSG $nick : 7         -c     cast" \r\n			putserv "PRIVMSG $nick : 7Example: !imdb -o -c Beautiful Mind" \r\n			return	\r\n		} \r\n\r\n	# Look for command line options and enable each, as desired\r\n	set fargs ""\r\n		set imdbtitle ""\r\n		foreach piece [split $args " "] {\r\n			set piece	[string trim $piece "{}"]\r\n				if {[string compare $piece "-r"] == 0 } {\r\n					set o_rating 1\r\n				} elseif {[string compare $piece "-g"] == 0 } {\r\n					set o_genre 1\r\n				} elseif {[string compare $piece "-t"] == 0 } {\r\n					set o_tagline 1\r\n				} elseif {[string compare $piece "-o"] == 0 } {\r\n					set o_outline 1\r\n				} elseif {[string compare $piece "-c"] == 0 } {\r\n					set o_cast 1\r\n				} else {\r\n					set fargs "$fargs $piece"\r\n				}\r\n		}\r\n        #set fargs [string trimleft $args]\r\n	if {$DEBUG == 1} {\r\n		putserv "PRIVMSG $nick :I am doing a search for \\"$fargs\\" on imdb.com"\r\n	}\r\n\r\n	set query $fargs\r\n\r\n		# do initial search\r\n		set searchString [ ::http::formatQuery $query ] \r\n                set searchString [string trimleft $searchString "+"]		\r\n                if {$DEBUG == 1} {\r\n		 putserv "PRIVMSG $nick :searchString: \\"$searchString\\""		\r\n		}\r\n                set page [::http::config -useragent $b_agent]\r\n                set page [::http::geturl ${imdbsearchurl}title=${searchString}&sort=smart&tv=off]\r\n\r\n		set redirect 0\r\n		set newurl ""\r\n\r\n		set lines [split [::http::data $page] \\n]\r\n		set numLines [llength $lines]\r\n\r\n		for {set i 0} {$i < $numLines} {incr i 1} {\r\n			set line [lindex $lines $i]\r\n				#if redirect necessary, find first link and redirect\r\n                                #putserv "PRIVMSG $nick : $line"\r\n				if {[string compare $line "<TITLE>IMDb title search</TITLE>"] == 0} {\r\n					set redirect 1\r\n		                        #putserv "PRIVMSG $nick : redirect 1"\r\n						for {} {$i < $numLines} {incr i 1} {\r\n							set line [lindex $lines $i]\r\n								if {[string compare -length 8 $line "<OL><LI>"] == 0} {\r\n									regexp HREF=\\"\\[^\\"\\]*\\" $line title\r\n										set title [string range $title 6 [expr [string length $title] - 2]] \r\n										append newurl $imdburl $title\r\n	\r\n										# get the page redirected to\r\n										set page [::http::config -useragent $b_agent]\r\n										set page [::http::geturl ${newurl}]\r\n										set lines [split [::http::data $page] \\n]\r\n								}\r\n						}\r\n					set i $numLines\r\n				}\r\n		}\r\n\r\n	# if no redirect happened, then get first page on match\r\n\r\n	if {$redirect == 0} {\r\n		upvar 0 $page oldpage\r\n			regexp Location\\ \\[^\\ \\]*\\ Connection $oldpage(meta) location\r\n		        #putserv "PRIVMSG $nick : $oldpage(meta)"                        \r\n			set newurl [string range $location 9 [expr [string length $location] - 12]]\r\n			set page [::http::config -useragent $b_agent]\r\n			set page [::http::geturl ${newurl}]\r\n			set lines [split [::http::data $page] \\n]\r\n	}\r\n\r\n	# for bogus searches\r\n	if {[string length $newurl] == 0} {\r\n		putserv "PRIVMSG $nick :No no no! I can''t find that!"\r\n			return\r\n	}\r\n\r\n	set numLines [llength $lines]\r\n\r\n	# scan for wanted data from the page\r\n		for {set i 0} {$i < $numLines} {incr i 1} {\r\n			set line [lindex $lines $i]\r\n				if {[string compare -length 7 $line "<title>"] == 0} {\r\n					# the movie title, year, url\r\n					set title [string range $line 7 [expr [string length $line] - 9]]\r\n						set title [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $title]\r\n						putserv "PRIVMSG $nick : $title  \\( $newurl \\)"\r\n				} elseif {($o_tagline == 1) && ([regexp \\[.\\]*Tagline:\\[.\\]* $line] > 0)} {\r\n					# the tagline\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" tagline\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $tagline "" tagline \r\n						regsub -all \\[\\ \\t\\]+ $tagline " " tagline \r\n						regsub -all \\&nbsp\\; $tagline " " tagline\r\n						set tagline [string trim $tagline " "]\r\n						set tagline [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $tagline]\r\n						putserv "PRIVMSG $nick :$tagline"\r\n				} elseif {($o_outline == 1) && ([regexp \\[.\\]*Outline:\\[.\\]* $line] > 0)} {\r\n				# the outline\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" outline\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $outline "" outline \r\n						regsub -all \\[\\ \\t\\]+ $outline " " outline \r\n						regsub -all \\&nbsp\\; $outline " " outline\r\n						set outline [string trim $outline " "]\r\n						set outline [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $outline]\r\n						putserv "PRIVMSG $nick :$outline"\r\n				} elseif {($o_genre == 1) && ([regexp \\[.\\]*Genres\\[.\\]* $line] > 0)} {\r\n					# the genre\r\n					regsub -all \\<\\[^\\>\\]*\\> $line "" genre\r\n						regsub -all \\\\\\(\\[^\\\\\\)\\]*\\\\\\) $genre "" genre\r\n						regsub -all \\[\\ \\t\\]+ $genre " " genre\r\n						set genre [string trim $genre " "]\r\n						set genre "Genre: $genre"\r\n						putserv "PRIVMSG $nick :$genre"\r\n				} elseif {($o_rating == 1) && ([regexp \\[.\\]*User\\ Rating\\[.\\]* $line] > 0)} { \r\n					# the user rating \r\n					set j [expr $i + 3] \r\n					set line2 [lindex $lines $j] \r\n					set j [expr $i + 4] \r\n					set line3 [lindex $lines $j] \r\n					regsub -all \\<\\[^\\>\\]*\\> $line3 "" rating \r\n						regsub -all \\&nbsp\\; $rating " " rating \r\n						regsub -all \\[\\ \\t\\]+ $rating " " rating \r\n						set rating [string trim $rating " "] \r\n						set goldstars [regexp -all goldstar $line2] \r\n						set greystars [expr 10 - $goldstars] \r\n					\r\n						# generating the rating bar \r\n						set marker "*" \r\n						set rating_bar " 11\\[ 7" \r\n						for {set i2 0} {$i2 < $goldstars} {incr i2 1} { \r\n							set rating_bar "$rating_bar$marker" \r\n						} \r\n					set marker "-" \r\n						set rating_bar "$rating_bar 14" \r\n						for {set i3 0} {$i3 < $greystars} {incr i3 1} { \r\n							set rating_bar "$rating_bar$marker" \r\n						} \r\n					set rating_bar "$rating_bar 11\\] " \r\n						putserv "PRIVMSG $nick :$rating $rating_bar"\r\n				} elseif {($o_cast == 1) && ([regexp \\[.\\]*\\\\\\.\\\\\\.\\\\\\.\\\\\\.\\[.\\]* $line] > 0)} {\r\n\r\n					if {[regexp Name $line] > 0} {\r\n						regsub -all \\<\\[^\\>\\]*\\> $line "" cast\r\n						set cast [string map {&#223; ß &#228; ä &#246; ö &#252; ü &#196; Ä &#214; Ö &#220; Ü &#232; è  &#233; é &#234; ê &#225; á &#224; à } $cast]\r\n		                                set checkargs [string trim $args " \\n"]						\r\n							putserv "PRIVMSG $nick :$cast"\r\n					}\r\n				}\r\n		}\r\n\r\n}\r\n\r\nputlog " -=\\[ chilla''s IMDB info version $imdbVERSION loaded \\]=- lastupdate 10-01-04 "\r\n\r\n', 0, 'none', 'dont work', 'none');
INSERT INTO `pastebin` VALUES (2481, 'rEg', '2004-12-06 19:14:07', 'proc passwd {nick host hand chan arg} {\r\nsql selectdb pre\r\n	if {[string tolower $chan] == "#headoffice"} {\r\n		set word [lindex [split $arg] 0]\r\n		set pass [lindex [split $arg] 1]\r\n		if {$pass == ""} {\r\n			putquick "PRIVMSG $chan :4\\[USER-PASS4\\] Checking for the password of: $word."\r\n		}\r\n	      set user [join [sql "SELECT pass FROM logins WHERE user=''$word'' ORDER BY pass DESC LIMIT 0, 1"]]\r\n			putquick "PRIVMSG $chan :4\\[USER-PASS4\\] PASSWD = $user"\r\n	}\r\n}', 0, 'tcl', 'invite', '#EggTCL');
INSERT INTO `pastebin` VALUES (2482, 'rEg', '2004-12-06 19:15:57', 'bind msg - !invite invite\r\n\r\nproc invite {nick host hand arg} {\r\nsql selectdb pre\r\n	set word [lindex [split $arg] 0]\r\n	set pass [lindex [split $arg] 1]\r\n		if {$pass == ""} {\r\n			putquick "PRIVMSG $nick :4\\[ERROR4\\] Did not receive a pass"\r\n			return 0\r\n		}\r\n	set user [join [sql "SELECT user,pass FROM logins WHERE pass=''$pass''"]]\r\n	putquick "PRIVMSG #headoffice :login from-$word passwd-$pass"\r\n}', 2481, 'tcl', 'invite (REAL :', '#EggTCL');
INSERT INTO `pastebin` VALUES (2483, 'Robb', '2004-12-06 19:27:42', 'bind msg - !invite invite\r\n\r\nproc invite {nick host hand arg} {\r\nsql selectdb pre\r\nset user [join [sql "SELECT user,pass FROM logins WHERE pass=''$pass''"]]\r\nset word [lindex [split $arg] 0]\r\nset pass [lindex [split $arg] 1]\r\nif {[string equal "" $pass]} {\r\n	putquick "PRIVMSG $nick :4\\[ERROR4\\] Did not receive a pass"\r\n	return\r\n	}\r\nif {[string equal [lindex $user 0] $word] && [string equal [lindex $user 1] $pass]} {	\r\n	putquick "PRIVMSG #headoffice :login from-$word passwd-$pass"\r\n	} else {\r\n	putquick "PRIVMSG $nick :login failed.."\r\n	return\r\n	}\r\n}', 2481, 'none', 'try this rEg', '#EggTCL');
INSERT INTO `pastebin` VALUES (2484, 'rEg', '2004-12-06 19:42:03', 'bind msg - !invite invite\r\n\r\nproc invite {nick host hand arg} {\r\nsql selectdb pre\r\nset word [lindex [split $arg] 0]\r\nset pass [lindex [split $arg] 1]\r\nset user [join [sql "SELECT user,pass FROM logins WHERE pass=''$pass''"]]\r\nif {[string equal "" $pass]} {\r\n	putquick "PRIVMSG $nick :4\\[ERROR4\\] Did not receive a pass"\r\n	return\r\n	}\r\nif {[string equal [lindex $user 0] $word] && [string equal [lindex $user 1] $pass]} {	\r\n	putquick "PRIVMSG #headoffice :4\\[INVITE4\\] $word was invited by the nick: $nick"\r\n	putquick "INVITE $nick #pre"\r\n	} else {\r\n	putquick "PRIVMSG $nick :4\\[ERROR4\\] LOGIN/PASS FAILED"\r\n	return\r\n	}\r\n}', 2483, 'tcl', 'update invite', '#EggTCL');
INSERT INTO `pastebin` VALUES (2485, 'Robb', '2004-12-06 19:46:06', 'bind msg - !invite invite\r\n\r\nproc invite {nick host hand arg} {\r\nsql selectdb pre\r\nset word [lindex [split $arg] 0]\r\nset pass [lindex [split $arg] 1]\r\nset user [join [sql "SELECT user,pass FROM logins WHERE pass=''$pass''"]]\r\nif {![botisop #pre]} {\r\n	putquick "PRIVMSG $nick :Iam not opped in #pre"\r\n	return\r\n	}\r\nif {[string equal "" $pass]} {\r\n	putquick "PRIVMSG $nick :4\\[ERROR4\\] Did not receive a pass"\r\n	return\r\n	}\r\nif {[string equal [lindex $user 0] $word] && [string equal [lindex $user 1] $pass]} {	\r\n	putquick "PRIVMSG #headoffice :4\\[INVITE4\\] $word was invited by the nick: $nick"\r\n	putquick "INVITE $nick #pre"\r\n	} else {\r\n	putquick "PRIVMSG $nick :4\\[ERROR4\\] LOGIN/PASS FAILED"\r\n	return\r\n	}\r\n}', 2484, 'none', 'Use this.', '#EggTCL');
INSERT INTO `pastebin` VALUES (2486, 'peoplez', '2004-12-09 11:40:35', 'proc pub:darksendpretimereq { nick host hand chan args } {\r\n        global pretime_announce_chans dupebot ignored_releases\r\n        if {![testchan $pretime_announce_chans $chan]} { return }\r\n        if {![isop $nick $chan]} { return }\r\n        set args [lindex $args 0]\r\n        set args [split $args \\[\\]]\r\n        set relname [string trim [file tail [filtercolours [lindex $args 5]]]]\r\n        foreach element $ignored_releases {\r\n                if {[regexp -nocase -all $element $relname]} { return }\r\n        }\r\n        putlog "release name = $relname"\r\n        putbot $dupebot "dupesearch $chan pretime $relname 1 *"\r\n}', 0, 'tcl', 'function', '#EggTCL');
INSERT INTO `pastebin` VALUES (2487, 'Barvaz', '2004-12-10 05:43:06', 'Tracing route to irc.homelien.no [2001:840:0:1000:1::1]\r\nfrom 2001:6f8:900:36a::2 over a maximum of 30 hops:\r\n\r\n  1      270 ms   284 ms   285 ms  gw-875.ham-01.de.sixxs.net [2001:6f8:900:36a::1]\r\n  2        *      283 ms   277 ms  fe1-0-536.6r0.isham.de.easynet.net [2001:6f8:800:1003::209:55]\r\n  3      264 ms   265 ms   269 ms  ge0-0-0-31.br1.isham.de.easynet.net [2001:6f8:892:4::1:11]\r\n  4      262 ms   257 ms   250 ms  so0-1-0-0.br0.ixfra.de.easynet.net [2001:6f8:800::51:2:1]\r\n  5      254 ms   260 ms   268 ms  fe1-0.6er0.ixfra.de.easynet.net [2001:6f8:888:5::10:40]\r\n  6      280 ms   282 ms   276 ms  de-cix.fra10.ip6.tiscali.net [2001:7f8::cb9:0:1]\r\n  7      270 ms   282 ms   290 ms  so-0-0-1.fra40.ip6.tiscali.net [2001:668:0:2::1c4]\r\n  8      291 ms   290 ms   297 ms  so-5-0-0.dus10.ip6.tiscali.net [2001:668:0:2::70]\r\n  9      389 ms   376 ms   354 ms  sl-bb1v6-bru-t-7.sprintv6.net [3ffe:2900:300:4::1]\r\n 10      370 ms   367 ms     *     sl-bb1v6-rly-t-1001.sprintv6.net [2001:440:1239:1002::1]\r\n 11      381 ms   382 ms   388 ms  us-nyc02a-re1-fe-0-0.ipv6.aorta.net [2001:730:0:4::1]\r\n 12      377 ms   381 ms   377 ms  us-nyc02a-re2-fe-1-0-0.ipv6.aorta.net [2001:730:0:4::2]\r\n 13      374 ms   384 ms   377 ms  uk-lon01a-re1-t-3.ipv6.aorta.net [2001:730::1:59]\r\n 14      378 ms   383 ms   378 ms  2001:730::1:30\r\n 15      397 ms   401 ms   405 ms  2001:730::1:1e\r\n 16        *        *        *     Request timed out.\r\n 17        *        *        *     Request timed out.\r\n 18        *        *        *     Request timed out.\r\n 19        *     ^C', 0, 'none', 'irc.homelien.no traceroute', 'none');
INSERT INTO `pastebin` VALUES (2315, 'leprechau', '2004-10-15 11:49:13', '/* Allows tcl scripts to send out raw data. Can be used for fast server write.\r\n * The server idx is 0.\r\n *\r\n * Usage: putdccraw <idx> <size> <rawdata>\r\n *\r\n * Example: putdccraw 6 13 "eggdrop rulz\\n"\r\n *\r\n * Added by <drummer@sophia.jpte.hu>.\r\n */\r\nstatic int tcl_putdccraw STDVAR\r\n{\r\n  int i, j = 0, z;\r\n\r\n  BADARGS(4, 4, " idx size text");\r\n\r\n  z = atoi(argv[1]);\r\n  for (i = 0; i < dcc_total; i++) {\r\n    if (!z && !strcmp(dcc[i].nick, "(server)")) {\r\n      j = dcc[i].sock;\r\n      break;\r\n    } else if (dcc[i].sock == z) {\r\n      j = dcc[i].sock;\r\n      break;\r\n    }\r\n  }\r\n  if (i == dcc_total) {\r\n    Tcl_AppendResult(irp, "invalid idx", NULL);\r\n    return TCL_ERROR;\r\n  }\r\n  tputs(j, argv[3], atoi(argv[2]));\r\n  return TCL_OK;\r\n}\r\n', 0, 'c', 'putdccraw eggdrop tcl command', 'none');
INSERT INTO `pastebin` VALUES (2316, 'Pixelz', '2004-10-15 20:30:10', 'bind raw - 302 raw_getuserhost\r\nproc raw_getuserhost {from keyword arg} {\r\n	regexp {^(.+?)\\*?=.(.+)$} [lindex $arg 1] - nick uhost\r\n	invite2 $nick $uhost\r\n	putserv "privmsg #tcltest2 : IN RAW_GETUSREHOST userhost: $fullhost"\r\n}\r\n\r\nproc invTimeout {nick} {\r\n	putserv "PRIVMSG ::invState($nick,chan) :Userhost lookup for $nick failed."\r\n	array unset ::invState $nick,*\r\n}\r\n\r\nproc pub:invite {nick uhost hand chan args} {\r\n	if {![auth:check $hand]} {\r\n		notice $nick "Authentication is required to use public commands. Please authenticate yourself"\r\n		return 0\r\n	}\r\n	if {[llength [split $args]] < 1} {\r\n		notice $nick "Usage: invite <nick> "\r\n		return 0\r\n	}\r\n	set args [lindex $args 0]\r\n	set who [join [lindex $args 0]]\r\n	set ::invState($who,chan) $chan\r\n	set ::invState($who,timer) [utimer 60 "invTimeout $who"]\r\n	putserv "USERHOST $who"\r\n	putserv "PRIVMSG $chan :Looking up userhost for $who"\r\n}\r\n\r\nproc invite2 {nick uhost} {\r\n	catch {killtimer $::invState($id,timer)}\r\n	set chan $::invState($id,chan)\r\n	array unset ::invState $nick,*\r\n	\r\n	set key [lindex [getchanmode $chan] 1]\r\n	putserv "PRIVMSG $chan : FROM INSIDE PUB:INVITE HOST IS : $userhost"\r\n	putserv "PRIVMSG $chan :\\[invite\\] invited $who to $chan"\r\n	adduser $nick "*!*${uhost}"\r\n	chattr $nick +f|+fv $chan\r\n	putserv "INVITE $nick $chan"\r\n	putserv "PRIVMSG $nick : You are invited to $chan temporarily the key to the channel is $key"\r\n	putserv "PRIVMSG $chan :\\[invite\\] $nick is allowed to stay in $chan temporarily."\r\n}', 0, 'tcl', 'invite thingy draft', '#EggTCL');
INSERT INTO `pastebin` VALUES (2476, 'Robb', '2004-12-05 15:37:11', 'set i 0\r\nbind pubm - * proc:say\r\n\r\nproc proc:say {nick uhost handle channel text} {\r\nset lines [set fid [open E:/db/random.txt r]\r\nset rand [split [read $fid] \\n]]\r\nset randline [lindex $lines [rand [llength $lines]]]\r\nglobal i\r\nset type [expr {int(rand()*2)}]\r\n\r\nif {$channel == "#hyperunknown" || $channel == "#prim4x"} { incr i }\r\n\r\nif {$i=="50"} { if {$type == "1"} {puthelp "PRIVMSG $channel :$nick: $randline"} else {puthelp "PRIVMSG $channel :$randline" } ; set i 0 }\r\n}', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2477, 'Robb', '2004-12-05 21:59:30', 'if { [string length [info vars ::lines]] == 0 } {\r\n  set file {C:/Program/Apache Group/Apache2/logs/access.log}\r\n  set handle [open $file r]\r\n  set content [split [read $handle] [format %c 10]]\r\n  set ::lines [expr [llength $content] - 1]\r\n  close $handle\r\n}\r\nutimer 2 ApacheExec\r\nproc ApacheExec {} {\r\n  set data [ApacheCheck]\r\n  foreach i $data {\r\n    if { [string length $i] == 0 } { break };\r\n    puthelp "PRIVMSG #apache-log :[ApacheReformat $i]"\r\n  }\r\n  utimer 2 ApacheExec\r\n}\r\nproc ApacheCheck {} {\r\n  set file {C:/Program/Apache Group/Apache2/logs/access.log}\r\n  set handle [open $file r]\r\n  set content [split [read $handle] [format %c 10]]\r\n  close $handle\r\n  set result [lrange $content $::lines [llength $content]]\r\n  set ::lines [expr [llength $content] - 1]\r\n  return $result\r\n}\r\nproc ApacheReformat {string} {\r\n  set string [split $string [format %c 32]]\r\n  set time [join [lrange [split [lindex $string 3] :] 1 3] :]\r\n  set request [string trimleft [join [lrange $string 5 6]] {"}]\r\n  return "\\[$time\\] <[lindex $string 0]> $request ([lrange $string 8 9])"\r\n}', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2478, 'Anonymous', '2004-12-06 06:35:49', '<a href=http://vzlomanet.x25.net.ru><b>NetworkFileManager</b></a> &#1080;&#1079;&#1085;&#1072;&#1095;&#1072;&#1083;&#1089;&#1103; &#1087;&#1080;&#1089;&#1072;&#1083;&#1089;&#1103; &#1076;&#1083;&#1103; &#1090;&#1086;&#1075;&#1086; &#1095;&#1090;&#1086;&#1073;&#1099; &#1084;&#1086;&#1078;&#1085;&#1086; &#1072;&#1076;&#1084;&#1080;&#1085;&#1080;&#1089;&#1090;&#1088;&#1072;&#1090;&#1080;&#1088;&#1086;&#1074;&#1072;&#1090;&#1100; &#1089;&#1074;&#1086;&#1081; &#1089;&#1072;&#1081;&#1090; &#1085;&#1077; &#1087;&#1088;&#1080;&#1073;&#1077;&#1075;&#1072;&#1103; &#1082; &#1092;&#1090;&#1087;, &#1090;&#1086; &#1077;&#1089;&#1090;&#1100; &#1091;&#1076;&#1072;&#1083;&#1077;&#1085;&#1085;&#1086;. &#1042; &#1087;&#1088;&#1086;&#1094;&#1077;&#1089;&#1089;&#1077; &#1088;&#1072;&#1073;&#1086;&#1090;&#1099; &#1074;&#1099;&#1103;&#1089;&#1085;&#1080;&#1083;&#1080;&#1089;&#1100; &#1076;&#1088;&#1091;&#1075;&#1080;&#1077; &#1080;&#1085;&#1090;&#1077;&#1088;&#1077;&#1089;&#1085;&#1099;&#1077; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1080; &#1089;&#1082;&#1088;&#1080;&#1087;&#1090;&#1072;, &#1089; &#1077;&#1075;&#1086; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1084;&#1086;&#1078;&#1085;&#1086; &#1073;&#1099;&#1083;&#1086; &#1089;&#1074;&#1086;&#1073;&#1086;&#1076;&#1085;&#1086; &#1087;&#1088;&#1086;&#1089;&#1084;&#1072;&#1090;&#1088;&#1080;&#1074;&#1072;&#1090;&#1100; &#1092;&#1072;&#1081;&#1083;&#1099; &#1085;&#1072; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1077; &#1080; &#1079;&#1072;&#1087;&#1091;&#1089;&#1082;&#1072;&#1090;&#1100; &#1089;&#1082;&#1088;&#1080;&#1087;&#1090;&#1099; &#1080; &#1087;&#1088;&#1086;&#1075;&#1088;&#1072;&#1084;&#1084;&#1099;... C&#1091;&#1097;&#1077;&#1089;&#1090;&#1074;&#1091;&#1077;&#1090; &#1076;&#1074;&#1077; &#1074;&#1077;&#1088;&#1089;&#1080;&#1080; &#1076;&#1072;&#1085;&#1085;&#1086;&#1075;&#1086; &#1089;&#1082;&#1088;&#1080;&#1087;&#1090;&#1072; &#1101;&#1090;&#1086; NetworkFileManagerPHP &#1080; NetworkFileManagerCGI, &#1088;&#1072;&#1079;&#1085;&#1080;&#1094;&#1072; &#1086;&#1076;&#1085;&#1086;&#1075;&#1086; &#1086;&#1090; &#1076;&#1088;&#1091;&#1075;&#1086;&#1075;&#1086; &#1074; &#1090;&#1086;&#1084; &#1095;&#1090;&#1086; &#1086;&#1076;&#1080;&#1085; &#1085;&#1072;&#1087;&#1080;&#1089;&#1072;&#1085; &#1085;&#1072; php &#1076;&#1088;&#1091;&#1075;&#1086;&#1081; &#1085;&#1072; perle. &#1050;&#1072;&#1078;&#1076;&#1099;&#1081; &#1084;&#1077;&#1085;&#1077;&#1076;&#1078;&#1077;&#1088; &#1085;&#1077;&#1089;&#1077;&#1090; &#1089;&#1074;&#1086;&#1102; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1102;. &#1048; &#1090;&#1072;&#1082; &#1087;&#1086; &#1087;&#1086;&#1076;&#1088;&#1086;&#1073;&#1085;&#1077;&#1077;:\r\n\r\nNetworkFileManagerPHP\r\n\r\n&#1057;&#1091;&#1097;&#1077;&#1089;&#1090;&#1074;&#1091;&#1077;&#1090; 2 &#1074;&#1077;&#1088;&#1089;&#1080;&#1080; &#1076;&#1072;&#1085;&#1085;&#1086;&#1075;&#1086; &#1089;&#1082;&#1088;&#1080;&#1087;&#1090;&#1072; &#1101;&#1090;&#1086; &#1087;&#1091;&#1073;&#1083;&#1080;&#1095;&#1085;&#1072;&#1103; &#1080; &#1087;&#1088;&#1080;&#1074;&#1072;&#1090;&#1085;&#1072;&#1103;.\r\n\r\n&#1055;&#1091;&#1073;&#1083;&#1080;&#1095;&#1085;&#1072;&#1103; &#1074;&#1077;&#1088;&#1089;&#1080;&#1103; &#1074;&#1082;&#1083;&#1102;&#1095;&#1072;&#1077;&#1090; &#1074; &#1089;&#1077;&#1073;&#1103;:\r\n1. &#1042;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086;&#1089;&#1090;&#1100; &#1087;&#1088;&#1086;&#1089;&#1084;&#1072;&#1090;&#1088;&#1080;&#1074;&#1072;&#1090;&#1100; &#1092;&#1072;&#1081;&#1083;&#1099; &#1093;&#1086;&#1089;&#1090;&#1080;&#1085;&#1075;&#1072; 2-&#1084;&#1103; &#1089;&#1087;&#1086;&#1089;&#1086;&#1073;&#1072;&#1084;&#1080; (&#1072;&#1082;&#1090;&#1091;&#1072;&#1083;&#1100;&#1085;&#1086; &#1077;&#1089;&#1083;&#1080; &#1086;&#1076;&#1080;&#1085; &#1080;&#1079; &#1085;&#1080;&#1093; &#1086;&#1090;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085; &#1085;&#1072; &#1093;&#1086;&#1089;&#1090;&#1080;&#1085;&#1075;&#1077;)\r\n2. &#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; &#1072;&#1083;&#1100;&#1103;&#1089;&#1086;&#1074;, &#1090;&#1086; &#1077;&#1089;&#1090;&#1100; &#1091;&#1078;&#1077; &#1075;&#1086;&#1090;&#1086;&#1074;&#1099;&#1077; &#1082;&#1086;&#1084;&#1072;&#1085;&#1076;&#1099;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1087;&#1088;&#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1099; &#1074; &#1088;&#1072;&#1089;&#1082;&#1088;&#1099;&#1074;&#1072;&#1102;&#1097;&#1077;&#1084; &#1089;&#1087;&#1080;&#1089;&#1082;&#1077; (&#1080;&#1085;&#1090;&#1077;&#1088;&#1077;&#1089;&#1085;&#1099; &#1085;&#1086;&#1074;&#1080;&#1095;&#1082;&#1072;&#1084;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1085;&#1077; &#1079;&#1085;&#1072;&#1102;&#1090; &#1083;&#1080;&#1085;&#1091;&#1082;&#1089;&#1072;)\r\n3. &#1057;&#1082;&#1072;&#1085;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072; &#1085;&#1072; &#1086;&#1090;&#1082;&#1088;&#1099;&#1090;&#1099;&#1077; &#1087;&#1086;&#1088;&#1090;&#1099;, &#1087;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1077;&#1090; &#1074;&#1089;&#1077; &#1086;&#1090;&#1082;&#1088;&#1099;&#1090;&#1099;&#1077; &#1087;&#1086;&#1088;&#1090;&#1099; &#1085;&#1072; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1077; &#1080; &#1080;&#1093; &#1087;&#1088;&#1077;&#1076;&#1085;&#1072;&#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;.\r\n4. &#1041;&#1088;&#1091;&#1090; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072;. &#1042;&#1089;&#1082;&#1088;&#1080;&#1087;&#1090; &#1074;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085; &#1087;&#1088;&#1086;&#1089;&#1090;&#1077;&#1085;&#1100;&#1082;&#1080;&#1081; &#1073;&#1088;&#1091;&#1090; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072;, &#1087;&#1088;&#1086;&#1074;&#1077;&#1088;&#1082;&#1072; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103; &#1087;&#1086; &#1077;&#1075;&#1086; &#1083;&#1086;&#1075;&#1080;&#1085;&#1091;.(&#1076;&#1072;&#1085;&#1085;&#1099;&#1077; &#1086; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;&#1093; &#1073;&#1077;&#1088;&#1091;&#1090;&#1100;&#1089;&#1103; &#1080;&#1079; &#1092;&#1072;&#1081;&#1083;&#1072; /etc/passwd)\r\n&#1042;&#1089;&#1077; &#1085;&#1072;&#1093;&#1086;&#1076;&#1080;&#1090;&#1089;&#1103; &#1074; &#1086;&#1076;&#1085;&#1086;&#1084; &#1092;&#1072;&#1081;&#1083;&#1077;. &#1074;&#1077;&#1089; &#1089;&#1086;&#1089;&#1090;&#1072;&#1074;&#1083;&#1103;&#1077;&#1090; 50 &#1050;&#1073;\r\n\r\nDownload: <a href=http://filez.mazafaka.ru/tools/nfm_en.zip><b>NetworkFileManager</a> [11 kb]\r\n\r\n&#1055;&#1088;&#1080;&#1074;&#1072;&#1090;&#1085;&#1072;&#1103;&#1074;&#1077;&#1088;&#1089;&#1080;&#1103; &#1074;&#1082;&#1083;&#1102;&#1095;&#1072;&#1077;&#1090; &#1074; &#1089;&#1077;&#1073;&#1103;:\r\n1. &#1042;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086;&#1089;&#1090;&#1100; &#1087;&#1088;&#1086;&#1089;&#1084;&#1072;&#1090;&#1088;&#1080;&#1074;&#1072;&#1090;&#1100; &#1092;&#1072;&#1081;&#1083;&#1099; &#1093;&#1086;&#1089;&#1090;&#1080;&#1085;&#1075;&#1072; 2-&#1084;&#1103; &#1089;&#1087;&#1086;&#1089;&#1086;&#1073;&#1072;&#1084;&#1080; (&#1072;&#1082;&#1090;&#1091;&#1072;&#1083;&#1100;&#1085;&#1086; &#1077;&#1089;&#1083;&#1080; &#1086;&#1076;&#1080;&#1085; &#1080;&#1079; &#1085;&#1080;&#1093; &#1086;&#1090;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085; &#1085;&#1072; &#1093;&#1086;&#1089;&#1090;&#1080;&#1085;&#1075;&#1077;)\r\n2. &#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; &#1072;&#1083;&#1100;&#1103;&#1089;&#1086;&#1074;, &#1090;&#1086; &#1077;&#1089;&#1090;&#1100; &#1091;&#1078;&#1077; &#1075;&#1086;&#1090;&#1086;&#1074;&#1099;&#1077; &#1082;&#1086;&#1084;&#1072;&#1085;&#1076;&#1099;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1087;&#1088;&#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1099; &#1074; &#1088;&#1072;&#1089;&#1082;&#1088;&#1099;&#1074;&#1072;&#1102;&#1097;&#1077;&#1084; &#1089;&#1087;&#1080;&#1089;&#1082;&#1077; (&#1080;&#1085;&#1090;&#1077;&#1088;&#1077;&#1089;&#1085;&#1099; &#1085;&#1086;&#1074;&#1080;&#1095;&#1082;&#1072;&#1084;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1085;&#1077; &#1079;&#1085;&#1072;&#1102;&#1090; &#1083;&#1080;&#1085;&#1091;&#1082;&#1089;&#1072;)\r\n3. &#1057;&#1082;&#1072;&#1085;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072; &#1085;&#1072; &#1086;&#1090;&#1082;&#1088;&#1099;&#1090;&#1099;&#1077; &#1087;&#1086;&#1088;&#1090;&#1099;, &#1087;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1077;&#1090; &#1074;&#1089;&#1077; &#1086;&#1090;&#1082;&#1088;&#1099;&#1090;&#1099;&#1077; &#1087;&#1086;&#1088;&#1090;&#1099; &#1085;&#1072; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1077; &#1080; &#1080;&#1093; &#1087;&#1088;&#1077;&#1076;&#1085;&#1072;&#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;.\r\n4. &#1041;&#1088;&#1091;&#1090; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072;. &#1042;&#1089;&#1082;&#1088;&#1080;&#1087;&#1090; &#1074;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085; &#1087;&#1088;&#1086;&#1089;&#1090;&#1077;&#1085;&#1100;&#1082;&#1080;&#1081; &#1073;&#1088;&#1091;&#1090; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072;, &#1087;&#1088;&#1086;&#1074;&#1077;&#1088;&#1082;&#1072; &#1087;&#1072;&#1088;&#1086;&#1083;&#1103; &#1087;&#1086; &#1077;&#1075;&#1086; &#1083;&#1086;&#1075;&#1080;&#1085;&#1091;.(&#1076;&#1072;&#1085;&#1085;&#1099;&#1077; &#1086; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;&#1093; &#1073;&#1077;&#1088;&#1091;&#1090;&#1100;&#1089;&#1103; &#1080;&#1079; &#1092;&#1072;&#1081;&#1083;&#1072; /etc/passwd)\r\n5. &#1044;&#1072;&#1084;&#1087; &#1073;&#1072;&#1079;&#1099; mysql. &#1042;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086;&#1089;&#1090;&#1100; &#1089;&#1076;&#1072;&#1084;&#1087;&#1080;&#1090;&#1100; &#1083;&#1102;&#1073;&#1091;&#1102; &#1073;&#1072;&#1079;&#1091; Mysql, &#1085;&#1072;&#1093;&#1086;&#1076;&#1103;&#1097;&#1091;&#1102;&#1089;&#1103; &#1085;&#1072; &#1101;&#1090;&#1086;&#1084; &#1093;&#1086;&#1089;&#1090;&#1080;&#1085;&#1075;&#1077;.\r\n6. &#1059;&#1089;&#1090;&#1072;&#1085;&#1086;&#1074;&#1082;&#1072; bash shella. &#1042;&#1099; &#1095;&#1077;&#1088;&#1077;&#1079; &#1089;&#1082;&#1088;&#1080;&#1087;&#1090; &#1074;&#1099; &#1084;&#1086;&#1078;&#1077;&#1090;&#1077; &#1087;&#1086;&#1083;&#1091;&#1095;&#1080;&#1090;&#1100; &#1087;&#1086;&#1083;&#1085;&#1086;&#1094;&#1077;&#1085;&#1085;&#1099;&#1081; &#1073;&#1072;&#1082;&#1076;&#1086;&#1088;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1081; &#1086;&#1090;&#1082;&#1088;&#1099;&#1074;&#1072;&#1077;&#1090; &#1085;&#1072; 4000 &#1087;&#1086;&#1088;&#1090;&#1091; &#1090;&#1077;&#1083;&#1085;&#1077;&#1090; &#1089;&#1086;&#1077;&#1076;&#1080;&#1085;&#1077;&#1085;&#1080;&#1077;. (&#1085;&#1077;&#1086;&#1073;&#1093;&#1086;&#1076;&#1080;&#1084; &#1076;&#1083;&#1103; &#1088;&#1091;&#1090;&#1072;&#1085;&#1080;&#1103; &#1089;&#1077;&#1088;&#1074;&#1077;&#1088;&#1072;)\r\n7. &#1047;&#1072;&#1097;&#1080;&#1097;&#1077;&#1085;&#1072; &#1079;&#1072;&#1089;&#1082;&#1088;&#1080;&#1087;&#1090;&#1086;&#1074;&#1072;&#1085;&#1085;&#1099;&#1084; &#1087;&#1072;&#1088;&#1086;&#1083;&#1077;&#1084;.\r\n8. &#1042; &#1087;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1102;&#1102; &#1074;&#1077;&#1088;&#1089;&#1080;&#1102; NFMPHP &#1074;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1072; &#1073;&#1072;&#1079;&#1072; &#1087;&#1088;&#1080;&#1074;&#1072;&#1090;&#1085;&#1099;&#1093; &#1080; &#1087;&#1091;&#1073;&#1083;&#1080;&#1095;&#1085;&#1099;&#1093; &#1101;&#1082;&#1089;&#1087;&#1083;&#1086;&#1081;&#1090;&#1086;&#1074;, &#1080;&#1093; &#1074;&#1099; &#1089;&#1084;&#1086;&#1078;&#1077;&#1090;&#1077; &#1089;&#1082;&#1072;&#1095;&#1072;&#1090;&#1100; &#1077;&#1089;&#1083;&#1080; &#1091; &#1074;&#1072;&#1089; &#1077;&#1089;&#1090;&#1100; &#1076;&#1086;&#1089;&#1090;&#1091;&#1087; &#1082; &#1087;&#1088;&#1080;&#1074;&#1072;&#1090;&#1085;&#1086;&#1081; &#1074;&#1077;&#1088;&#1089;&#1080;&#1080;(&#1076;&#1083;&#1103; &#1082;&#1072;&#1078;&#1076;&#1086;&#1075;&#1086; &#1102;&#1079;&#1077;&#1088;&#1072; &#1089;&#1074;&#1086;&#1081; &#1072;&#1082;&#1082;&#1072;&#1091;&#1085;&#1090;, &#1076;&#1072;&#1077;&#1090;&#1089;&#1103; &#1085;&#1072; &#1074;&#1088;&#1077;&#1084;&#1103;.) &#1042;&#1089;&#1077; &#1101;&#1082;&#1089;&#1087;&#1083;&#1086;&#1081;&#1090;&#1099; &#1089;&#1082;&#1086;&#1084;&#1087;&#1080;&#1083;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1099; &#1080; &#1080;&#1084;&#1077;&#1102;&#1090; &#1087;&#1086;&#1076;&#1088;&#1086;&#1073;&#1085;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1080;&#1093; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1103;.\r\n&#1042;&#1089;&#1077; &#1085;&#1072;&#1093;&#1086;&#1076;&#1080;&#1090;&#1089;&#1103; &#1074; &#1086;&#1076;&#1085;&#1086;&#1084; &#1092;&#1072;&#1081;&#1083;&#1077;. &#1074;&#1077;&#1089; &#1089;&#1086;&#1089;&#1090;&#1072;&#1074;&#1083;&#1103;&#1077;&#1090; 70 &#1050;&#1073;', 2204, 'c', 'none', 'none');
INSERT INTO `pastebin` VALUES (2480, 'M[e]rlin', '2004-12-06 19:13:19', '# *** READ THIS ***\r\n\r\n# INSTALLATION\r\n\r\n# i) Place this TCL into your eggdrop/scripts directory,\r\n# ii) make the usual ''source scripts/expose.tcl''\r\n#     entry at the end of eggdrop.conf,\r\n# iii) and rehash the bot as normal.\r\n\r\n# CONFIGURATION\r\n\r\n# The configuration section is below. Those who insist on\r\n# tinkering will find another section beneath that defining\r\n# various constants used by the script, including nearly all\r\n# the outputted text, and the regexps used to strip the\r\n# quotes from the HTML.\r\n# Don''t muck with this if you don''t know what you''re doing.\r\n\r\n# COMMANDS\r\n\r\n# The following commands are recognised by default:\r\n\r\n# !exposed\r\n#     - this displays a random quote from the exposed.coldfront.org quote\r\n#       database. The quote will always appear in a public\r\n#       channel, because the script will ignore entries in\r\n#       its random quote cache that have a length exceeding\r\n#       exposed_max_public_line_length.\r\n#	  If you didn''t understand this, don''t worry about it.\r\n\r\n# !exposed <text>\r\n#     - Needless to say, the < and > symbols should not be\r\n#       typed in as part of the command.\r\n#       (Unless you''re searching for a nick, of course.)\r\n#       Fetches the quote numbers of the first N quotes\r\n#       (N being defined by exposed_max_search_results in the\r\n#       config section below) that match text <text>.\r\n\r\n# !exposed <number>\r\n#     - Again, no < and > symbols, please.\r\n#       Fetches a specific numbered quote from the QDB.\r\n#       If it contains less lines than the\r\n#       exposed_max_public_line_length setting,\r\n#       the quote will be displayed publically. If not, it\r\n#       will be privately /msged or /noticed to the use\r\n#       who requested it.\r\n\r\n# HOW IT WORKS\r\n\r\n# If you want to get on and configure the damn thing, skip this\r\n# section.\r\n\r\n# The random quote function was the first written. It makes\r\n# an HTTP query to the ''Random'' link on the exposed.coldfront.org front page.\r\n# It receives the response and then uses various regexp filters\r\n# to extract the quotes and place them in a TCL list (exposed_cache).\r\n# Meanwhile the numbers of the quotes are stored in another list\r\n# (exposed_number_list). The position of the next item that is\r\n# to be displayed from these lists is marked by the\r\n# exposed_cache_pointer_position variable. Requesting quotes is\r\n# disabled when the cache is empty and, if not already running,\r\n# an HTTP query is attempted to refill the cache. The cache will\r\n# also be refilled when the pointer hits the end of the list.\r\n# When a quote is requested, exposed_cache[exposed_cache_pointer_position]\r\n# and exposed_number_list[exposed_cache_pointer_position] are read,\r\n# the pointer is incremented, and the resulting texts are again\r\n# regexp filtered by the exposed_output function for de-escaping of\r\n# HTML entities (&nbsp; etc). If the length of the quote exceeds\r\n# exposed_max_public_line_length, the pointer is repeatedly\r\n# incremented until this condition is not true. If\r\n# exposed_max_public_line_length is set low, only a few quotes will\r\n# be displayed by this command per HTML query.\r\n# The TCL commands to display the quote in the channel are placed\r\n# on the event queue with the ''after'' command and told to execute\r\n# a certain time apart (this time being set by the\r\n# exposed_seconds_per_line setting). \r\n\r\n# The !exposed <number> command works similarly to the random quote\r\n# function and borrows a lot of code from it. This time, an HTTP \r\n# query is made to the appropriate exposed.coldfront.net web page for a certain\r\n# numbered quote. The returned HTML is stripped of its tags as\r\n# before. If the quote is longer than exposed_max_public_line_length,\r\n# it is privately messaged to the requesting nick. Otherwise,\r\n# it is displayed in the channel.\r\n\r\n# The !exposed <text> command is a little different to the other two.\r\n# It makes a request using the search function of the exposed.coldfront.net\r\n# website (for a maximum number of quotes set by\r\n# exposed_max_search_results), and parses out only the quote numbers\r\n# of the returned HTML. These are always displayed publically.\r\n\r\n# ---------------------------------------------\r\n# *** CONFIGURATION SECTION ***\r\n#\r\nset exposed_command "!exposed"\r\n#\r\n# ^-- the public command to invoke the script\r\n#\r\n#     the suffices ''_usage'' and ''_version'', when appended onto the\r\n#     end of this command, also form commands.\r\n#     i.e. if exposed_command were, say, "!moose", then the commands\r\n#     "!exposed_usage" and "!exposed_version"\r\n#     would now become "!moose_usage" and "!moose_version".\r\n#\r\n#\r\nset exposed_max_public_line_length 8\r\n#\r\n# ^-- this defines the longest quote (number of lines) which the\r\n#     script will display publically rather than as a private message.\r\n#     Somewhere between 4 and 12 should be good depending on how\r\n#     busy your channel is.\r\n#\r\n#\r\nset exposed_seconds_per_quote 15\r\n#\r\n# ^-- this defines the number of seconds that the bot will wait\r\n#     for after displaying one quote before it allows another\r\n#     to be requested. Set to 0 to disable this floodprotection.\r\n#\r\n#\r\nset exposed_seconds_per_line 0\r\n#\r\n# ^-- this defines the number of seconds that the bot will wait\r\n#     between displaying two lines of the same quote.\r\n#     Bear in mind that eggdrops won''t display more than one\r\n#     line per few seconds even if this is set to 0.\r\n#\r\n#\r\nset exposed_max_search_results 10\r\n#\r\n# ^-- maximum number of search results returned by a\r\n#     !exposed <text> query.\r\n#     Bear in mind that the maximum IRC server line length will\r\n#     limit you if you set this to something large (> 25 or so).\r\n#\r\n#\r\nset exposed_enable_debug 1\r\n#\r\n# ^-- this should always be set to 0 unless you''re having some\r\n#     issues, i.e. the script isn''t working. Beware that it will\r\n#     spray all sorts of debugging crap into the eggdrop logs.\r\n#\r\n#\r\nset exposed_use_blocking_number_fetch 1\r\nset exposed_use_blocking_search_fetch 1\r\nset exposed_use_blocking_random_fetch 0\r\n#\r\n# ^-- these three define the mode used to make the queries to the\r\n#     exposed.coldfront.org webserver. If you don''t understand the difference\r\n#     between blocking and non-blocking (callback) fetch, you''re\r\n#     probably better leaving them as they are.\r\n#     This is the default because it has been discovered through\r\n#     experimentation than blocking fetches are a lot faster than non-\r\n#     blocking ones, at least on my eggdrop (1.6.12 / linux 2.4.20).\r\n#     However some may consider non-blocking fetches to be more stable.\r\n#     Feel free to set them to 0 but don''t be surprised if it''s as\r\n#     slow as a snail.\r\n#\r\n#\r\nset exposed_lock_reset_time_ms 600000\r\n#\r\n# ^-- this is the amount of time in milliseconds the script\r\n#     will wait for before removing a stale exposed_lock lock.\r\n#     This attempts to combat failed fetch-related siezeups,\r\n#     and their associated annoying public messages.\r\n#     Currently 10 minutes. You shouldn''t need to change it.\r\n#     This is new and experimental. I don''t know whether it\r\n#     solves the problem successfully or not.\r\n#\r\n#\r\nset exposed_use_notices 1\r\n#\r\n# ^-- this specifies whether lengthy quotes should be /noticed to\r\n#     the recipient''s nick or /msged there. Set to 0 to use /msg.\r\n#     Set to 1 to use /notice.\r\n#\r\n#\r\nset exposed_spit_channel_list [list]\r\n\r\n# lappend exposed_spit_channel_list "#somechannel 5"\r\n# lappend exposed_spit_channel_list "#someotherchannel 10"\r\n# lappend exposed_spit_channel_list "#anotherchannel 60"\r\n# lappend exposed_spit_channel_list "#\\[channel_with_brackets\\] 120"\r\n# # ... more lappend lines here ...\r\n\r\n#\r\n# ^-- if you want the bot to spit out random quotes into a channel\r\n#     or channels, you will need to add the names of the channels\r\n#     to which this applies by uncommenting one or more ''lappend ...'' lines\r\n#     here and changing the channel name and the number that follows\r\n#     it. This number is the number of minutes you want the bot to\r\n#     wait between spitting out one quote and spitting out the next.\r\n#     It may be set independently for each of the channels on the list.\r\n#     There must be a space between the channel name and the number.\r\n#	If your channel name contains [square brackets], you will need\r\n#	to slash-escape the brackets ( ''['' -> ''\\['' , '']'' -> ''\\]'' )\r\n#	as in the example above.\r\n\r\n# ----------------------------------------------\r\n# *** DEFAULT CHANNEL (PUBLIC) COMMANDS ***\r\n\r\n# !exposed          :  displays a random quote from the exposed.coldfront.org QDB;\r\n# !exposed <number> :  displays a specific quote from the exposed.coldfront.org QDB;\r\n# !exposed <text>   :  searches for quotes matching <text> in the exposed.coldfront.net\r\n#                   QDB and displays their numbers;\r\n# !exposed_version  :  shows the script version;\r\n# !exposed_usage    :  shows the commands that this script supports.\r\n\r\n## ---------------------------------------------\r\n## Don''t change anything below this line.\r\n## ---------------------------------------------\r\n#http://exposed.coldfront.net/?searched&sortby=rating&search=Mag\r\n#	set url $query_prefix$query_suffix_search[http::formatQuery $query_get_parm_number $query_get_parm_search $text]\r\npackage require http\r\n\r\nset agent "Mozilla"\r\nset query_prefix "http://exposed.coldfront.net/?"\r\nset query_suffix_random "random"\r\nset query_suffix_number ""\r\nset query_suffix_search "searched"\r\nset query_get_parm_number "sortby=rating"\r\nset query_get_parm_search "search="\r\nset exposed_cache_pointer_position 0\r\nset exposed_cache [list]\r\nset exposed_number_list [list]\r\nset exposed_lock 0\r\nset exposed_result_regexp "<span class=''quote''>(.*?)</a>(.*</html>)"\r\nset exposed_number_regexp "#(\\[0-9\\])</a>"\r\nset exposed_newline_regexp "<br />|</span></div>"\r\n\r\n# text strings\r\n\r\nset exposed_ver 					"!exposed for exposed.coldfront.net 1.0 (working on searh and number display) by Merlin"\r\nset exposed_search_result_individual_prefix 	""\r\nset exposed_search_result_separator 		" | "\r\nset exposed_command_suffix_debug 		"_debug"\r\nset exposed_command_suffix_version 		"_version"\r\nset exposed_command_suffix_usage 		"_usage"\r\nset exposed_command_suffix_restart 		"_restart"\r\n\r\nset exposed_errortext_http_fetch 		"error: \\002$exposed_command\\002: command is locked while HTTP fetch is performed. Try again in 10 seconds."\r\nset exposed_errortext_failed_init 		"error: \\002$exposed_command\\002: exposed_cache is empty (failed initialisation)"\r\nset exposed_errortext_cache_spent		"error: \\002$exposed_command\\002: exposed_cache is spent (HTTP lookup to refresh it must have failed ... retrying)" \r\nset exposed_errortext_fetch_locked		"error: \\002$exposed_command\\002: exposed_lock is 1, cannot continue."\r\nset exposed_errortext_infinite_loop		"error: \\002$exposed_command\\002: safety_measure > 100 in exposedCallback, assuming infinite loop and terminating"\r\nset exposed_errortext_spitlist_invalid		"error: \\002$exposed_command\\002: exposed_spit_channel_list contains illegal entries : check configuration"\r\nset exposed_unlock_warning				"$exposed_ver: WARNING: waited longer than $exposed_lock_reset_time_ms for query, unlocking."\r\n\r\nset exposed_text_search_result_prefix 		"\\002$exposed_command\\002 search results: "\r\nset exposed_text_usage_1 				"\\002$exposed_command\\002: usage: $exposed_command for a random quote"\r\nset exposed_text_usage_2 				"              $exposed_command <number> for a specific quote"\r\nset exposed_text_usage_3 				"              $exposed_command <text> to search for a quote containing text <text> (does not work yet)"\r\nset exposed_text_no_search_results 		"\\002$exposed_command\\002: no results found for search"\r\nset exposed_text_version 				"\\002$exposed_ver"\r\nset exposed_text_too_many_lines_1		"\\002$exposed_command\\002: quote has too many lines to display in public channel (max $exposed_max_public_line_length, quote has "\r\nset exposed_text_too_many_lines_2		"): sending as privmsg instead"\r\nset exposed_text_quote_not_found			"\\002$exposed_command\\002: quote not found"\r\nset exposed_text_running				"$exposed_ver: RUNNING, use $exposed_command to invoke."\r\n\r\nbind pubm * "* $exposed_command*" exposed_decide\r\nbind pubm * "* $exposed_command$exposed_command_suffix_usage" exposed_usage_wrapper\r\nbind pubm * "* $exposed_command$exposed_command_suffix_version" exposed_version\r\n\r\n#bind pubm * "* $exposed_command$exposed_command_suffix_restart" exposed_restart\r\n#bind pubm * "* $exposed_command$exposed_command_suffix_debug" exposed_debug\r\n\r\n## -------------------------------------------------\r\n## DEFINITELY don''t change anything below THIS line.\r\n## -------------------------------------------------\r\n\r\nset startup_time [clock clicks -milliseconds]\r\nset exposed_last_quote_time [expr $startup_time - 60000]\r\nset exposed_nick_token_hash(0) 0\r\nset exposed_channel_token_hash(0) 0\r\n\r\n## we need to disable any ''after'' commands that may still be on\r\n## the event queue from a previous invocation:\r\n\r\nset exposed_after_list [after info]\r\n\r\nforeach token $exposed_after_list {\r\n	set id_info [after info $token]\r\n	if { [regexp .*exposed_spit.* $id_info] } {\r\n		if { $exposed_enable_debug } {\r\n			putlog "!exposed: procname matched exposed_spit: removing from queue"\r\n		}\r\n		after cancel $token\r\n	}\r\n}\r\n\r\nproc exposed_debug { n u h c t } {\r\n\r\n	global exposed_cache\r\n	global exposed_lock\r\n	global exposed_cache_pointer_position\r\n	global exposed_number_list\r\n\r\n	op "list length: [llength $exposed_cache] | number list length: [llength $exposed_number_list] | lock: $exposed_lock | exposed_cache_pointer_position: $exposed_cache_pointer_position" $c\r\n\r\n}\r\n\r\nproc locked_error { c } {\r\n	global exposed_errortext_http_fetch\r\n	op $exposed_errortext_http_fetch $c\r\n}\r\n\r\nproc exposed_decide { n u h c t } {\r\n\r\n	global exposed_command\r\n	global exposed_command_suffix_debug\r\n	global exposed_command_suffix_restart\r\n	global exposed_command_suffix_usage\r\n	global exposed_command_suffix_version\r\n	global exposed_last_quote_time\r\n	global exposed_seconds_per_quote\r\n	global exposed_enable_debug\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_decide $n $u $h $c $t"\r\n	}\r\n\r\n	if { [expr "$exposed_last_quote_time + ($exposed_seconds_per_quote * 1000)"] > [clock clicks -milliseconds] } {\r\n		if { $exposed_enable_debug } {\r\n			putlog "exposed_decide: returned due to inter-quote time being exceeded: b_l_q_t = $exposed_last_quote_time | b_s_p_q = $exposed_seconds_per_quote | clock clicks = [clock clicks -milliseconds]"\r\n		}\r\n		return\r\n	}\r\n\r\n	if { [regexp "($exposed_command$exposed_command_suffix_debug *)|($exposed_command$exposed_command_suffix_restart *)|($exposed_command$exposed_command_suffix_usage *)|($exposed_command$exposed_command_suffix_version)" $t] } {\r\n		if { $exposed_enable_debug } {\r\n			putlog "exposed_decide: returned due to detection of valid alternate command suffix"\r\n		}\r\n		return\r\n	}\r\n\r\n	if { [string length $t] > [string length $exposed_command] } {\r\n		set blah "^$exposed_command *\\[0-9\\]+$"\r\n		if { [regexp $blah $t match] } {\r\n			exposed_number $n $u $h $c $t\r\n			return\r\n		}\r\n		exposed_search $n $u $h $c $t\r\n	} else {\r\n		exposed_random $n $u $h $c $t\r\n	}\r\n\r\n}\r\n\r\nproc exposed_search { n u h c t } {\r\n\r\n	global exposed_command\r\n	global agent\r\n	global query_get_parm_search\r\n	global query_get_parm_number\r\n	global query_prefix\r\n	global query_suffix_search\r\n	global exposed_max_search_results\r\n	global exposed_enable_debug\r\n	global exposed_nick_token_hash\r\n	global exposed_channel_token_hash\r\n	global exposed_use_blocking_search_fetch\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_search $n $u $h $c $t"\r\n	}\r\n		\r\n	regexp "^$exposed_command *(.*)$" $t blah text\r\n\r\n	http::config -useragent $agent\r\n#	set url $query_prefix$query_suffix_search[http::formatQuery $query_get_parm_search $text $query_get_parm_number $exposed_max_search_results]\r\n	set url $query_prefix$query_suffix_search[http::formatQuery $query_get_parm_number $query_get_parm_search $text]\r\n	if { $exposed_use_blocking_search_fetch == 0 } {\r\n		set token [http::geturl $url -command exposedCallback_search]\r\n		set exposed_nick_token_hash($token) $n\r\n		set exposed_channel_token_hash($token) $c\r\n	} else {\r\n		set token [http::geturl $url]\r\n		set exposed_nick_token_hash($token) $n\r\n		set exposed_channel_token_hash($token) $c\r\n		exposedCallback_search $token\r\n	}\r\n\r\n}\r\n\r\nproc exposedCallback_search { token } {\r\n\r\n	global exposed_result_regexp\r\n	global exposed_number_regexp\r\n	global exposed_max_search_results\r\n	global exposed_search_result_separator\r\n	global exposed_text_search_result_prefix\r\n	global exposed_command\r\n	global exposed_search_result_individual_prefix\r\n	global exposed_text_no_search_results\r\n	global exposed_enable_debug\r\n	global exposed_nick_token_hash\r\n	global exposed_channel_token_hash\r\n\r\n	set nick $exposed_nick_token_hash($token)\r\n	set channel $exposed_channel_token_hash($token)\r\n	unset exposed_nick_token_hash($token)\r\n	unset exposed_channel_token_hash($token)\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposedCallback_search $token $nick $channel"\r\n	}\r\n\r\n	catch {\r\n\r\n		set result [http::data $token]\r\n		unset $token\r\n		set search_results [list]\r\n\r\n		set count 0\r\n\r\n		while { [regexp $exposed_number_regexp $result blah numero the_rest] } {\r\n\r\n			if { $count > $exposed_max_search_results } {\r\n				break\r\n			}\r\n\r\n			lappend search_results $numero\r\n\r\n			set result $the_rest\r\n			incr count\r\n\r\n		}\r\n\r\n		set search_result_string $exposed_text_search_result_prefix\r\n		set separator ""\r\n\r\n		foreach search_result $search_results {\r\n			set search_result_string $search_result_string$separator$exposed_search_result_individual_prefix$search_result\r\n			set separator $exposed_search_result_separator\r\n		}\r\n\r\n		if { $count == 0 } {\r\n			op $exposed_text_no_search_results $channel\r\n			return\r\n		}\r\n\r\n		op $search_result_string $channel\r\n\r\n		return\r\n\r\n	} errorstg\r\n\r\n	putlog $errorstg\r\n\r\n}\r\n\r\nproc exposed_number { n u h c t } {\r\n	global exposed_enable_debug\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_number $n $u $h $c $t"\r\n	}\r\n	regexp "\\[0-9\\]+" $t match\r\n	exposed_dot_org_fetch_number $match $n $c\r\n}\r\n\r\nproc exposed_usage_wrapper { n u h c t } {\r\n	exposed_usage $c\r\n}\r\n\r\nproc exposed_usage { c } {\r\n\r\n	global exposed_text_usage_1\r\n	global exposed_text_usage_2\r\n	global exposed_text_usage_3\r\n\r\n	op $exposed_text_usage_1 $c\r\n	op $exposed_text_usage_2 $c\r\n	op $exposed_text_usage_3 $c\r\n\r\n}\r\n\r\nproc exposed_version { n u h c t } {\r\n	global exposed_text_version\r\n	op $exposed_text_version $c\r\n}\r\n\r\nproc exposed_random { n u h c t } {\r\n\r\n	global exposed_cache\r\n	global exposed_cache_pointer_position\r\n	global exposed_lock\r\n	global exposed_number_list\r\n	global exposed_command\r\n	global exposed_errortext_failed_init\r\n	global exposed_errortext_cache_spent\r\n	global exposed_enable_debug\r\n	global exposed_lock_reset_time_ms\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_random $n $u $h $c $t"\r\n	}\r\n\r\n#	if { $exposed_lock != 0 } {\r\n#		locked_error $c\r\n#		return\r\n#	}\r\n	if { $exposed_lock != 0 } {\r\n		locked_error $c\r\n		if { [expr [clock clicks -milliseconds] - $exposed_lock] < $exposed_lock_reset_time_ms } {\r\n#			putlog $exposed_ver $exposed_errortext_fetch_locked\r\n			return\r\n		}\r\n		putlog $exposed_unlock_warning\r\n		set exposed_lock 0\r\n	}\r\n\r\n	if { [llength $exposed_cache] == 0 } {\r\n		op "exposed_cache is empty - refilling ..." $c\r\n		exposed_dot_org_fetch_random\r\n		return\r\n	}\r\n\r\n	if { $exposed_cache_pointer_position >= [llength $exposed_cache] } {\r\n		op "exposed_cache is empty - refilling ..." $c\r\n		exposed_dot_org_fetch_random\r\n		return\r\n	}\r\n\r\n	if { [exposed_output [lindex $exposed_cache $exposed_cache_pointer_position] [lindex $exposed_number_list $exposed_cache_pointer_position] $c $n 1] == 0 } {\r\n		set failed 1\r\n	} else {\r\n		set failed 0\r\n	}\r\n\r\n	incr exposed_cache_pointer_position\r\n\r\n	if { $exposed_cache_pointer_position >= [llength $exposed_cache] } {\r\n		if { $failed == 1 } {\r\n			locked_error $c\r\n		}\r\n		exposed_dot_org_fetch_random\r\n	} else {\r\n		if { $failed == 1 } {\r\n			exposed_random $n $u $h $c $t\r\n		}\r\n	}\r\n}\r\n\r\nproc exposed_output { text number c n allow_failure } {\r\n\r\n	global exposed_max_public_line_length\r\n	global exposed_command\r\n	global exposed_text_too_many_lines_1\r\n	global exposed_text_too_many_lines_2\r\n	global exposed_seconds_per_line\r\n	global exposed_last_quote_time\r\n	global exposed_enable_debug\r\n	global exposed_use_notices\r\n	global exposed_newline_regexp\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_output $text $number $c $n $allow_failure"\r\n	}\r\n\r\n	regsub -all "(\\r)|(\\n)" "$text " "" tmp4\r\n	regsub -all $exposed_newline_regexp $tmp4 "\\n" tmp5\r\n	regsub -all "&gt;" $tmp5 ">" tmp6\r\n	regsub -all "&lt;" $tmp6 "<" tmp7\r\n	regsub -all "&quot;" $tmp7 "''" tmp8\r\n	regsub -all "&nbsp;" $tmp8 " " tmp9\r\n	regsub -all "amp;" $tmp9 "" tmp10\r\n\r\n	set lst [split $tmp10 "\\n"]\r\n\r\n	if { [llength $lst] > $exposed_max_public_line_length } {\r\n		if { $allow_failure } {\r\n			return 0\r\n		}\r\n		op $exposed_text_too_many_lines_1[llength $lst]$exposed_text_too_many_lines_2 $c\r\n		if { $exposed_use_notices } {\r\n			set target "NOTICE $n"\r\n		} else {\r\n			set target "PRIVMSG $n"\r\n		}\r\n	} else {\r\n		set target "PRIVMSG $c"\r\n	}\r\n\r\n	set delay_increment [expr $exposed_seconds_per_line * 1000]\r\n	set delay 0\r\n\r\n	set exposed_last_quote_time [clock clicks -milliseconds]\r\n\r\n	# fix for brackets-in-channel-name bug (thanks CGlass)\r\n	regsub -all \\\\\\] $target \\\\\\] target\r\n	regsub -all \\\\\\[ $target \\\\\\[ target\r\n\r\n	foreach tmp11 $lst {\r\n		# these two might look like NOPs. They aren''t. Remember square brackets are reserved in regexp too.\r\n		regsub -all \\\\\\] $tmp11 \\\\\\] tmp11\r\n		regsub -all \\\\\\[ $tmp11 \\\\\\[ tmp11\r\n		if { $number == -1 } {\r\n			set to_ex "putserv \\"$target :\\002|exposed|\\002 $tmp11\\""\r\n			after $delay $to_ex\r\n		} else {\r\n			set to_ex "putserv \\"$target :\\002|exposed $number|\\002 $tmp11\\""\r\n			after $delay $to_ex\r\n		}\r\n		set delay [expr $delay + $delay_increment]\r\n	}\r\n\r\n	return 1\r\n\r\n}\r\n\r\nproc exposed_restart { n u h c t } {\r\n	exposed_init\r\n}\r\n\r\nproc exposed_init { } {\r\n\r\n	global exposed_ver\r\n	global exposed_spit_channel_list\r\n	global exposed_error\r\n	global exposed_errortext_spitlist_invalid\r\n	global exposed_enable_debug\r\n	global exposed_lock\r\n\r\n	set exposed_lock 0\r\n\r\n	exposed_dot_org_fetch_random\r\n\r\n	if { [llength $exposed_spit_channel_list] > 0 } {\r\n\r\n		if { [check_exposed_spit_channel_list] == 0 } {\r\n\r\n			putlog $exposed_errortext_spitlist_invalid\r\n			die\r\n\r\n		} else {\r\n\r\n			set i 0\r\n\r\n			while { $i < [llength $exposed_spit_channel_list] } {\r\n\r\n				regexp "^(.+) (\\[0-9\\]+)$" [lindex $exposed_spit_channel_list $i] blah channel delay\r\n				set delay_ms [expr $delay * 60000]\r\n\r\n				# fix for brackets-in-channel-name bug (thanks CGlass)\r\n				regsub -all \\\\\\] $channel \\\\\\] channel\r\n				regsub -all \\\\\\[ $channel \\\\\\[ channel\r\n				set to_ex "exposed_spit $channel $delay_ms"\r\n\r\n				if { $exposed_enable_debug } {\r\n					putlog "!exposed: placing spit command on event queue : after $delay_ms $to_ex"\r\n				}\r\n\r\n				after $delay_ms $to_ex\r\n\r\n				incr i\r\n\r\n			}\r\n		}\r\n	}\r\n}\r\n\r\nproc exposed_spit { channel delay } {\r\n\r\n	global exposed_enable_debug\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_spit $channel $delay"\r\n	}\r\n\r\n	exposed_random \\000 \\000 \\000 $channel \\000\r\n\r\n	regsub -all \\\\\\] $channel \\\\\\] channel\r\n	regsub -all \\\\\\[ $channel \\\\\\[ channel\r\n\r\n	set to_ex "exposed_spit $channel $delay"\r\n	if { $exposed_enable_debug } {\r\n		putlog "!exposed: placing spit command on event queue : after $delay $to_ex"\r\n	}\r\n	after $delay $to_ex\r\n\r\n}\r\n\r\nproc check_exposed_spit_channel_list { } {\r\n\r\n	global exposed_spit_channel_list\r\n\r\n	set i 0\r\n\r\n	while { $i < [llength $exposed_spit_channel_list] } {\r\n		if { [regexp "^.+ \\[0-9\\]+$" [lindex $exposed_spit_channel_list $i]] == 0 } {\r\n			return 0\r\n		} else {\r\n			incr i\r\n		}\r\n	}\r\n\r\n	return 1\r\n\r\n}\r\n\r\nproc exposed_dot_org_fetch_number { n nick c } {\r\n\r\n	global agent\r\n	global query_prefix\r\n	global query_suffix_number\r\n	global exposed_enable_debug\r\n	global exposed_nick_token_hash\r\n	global exposed_channel_token_hash\r\n	global exposed_use_blocking_number_fetch\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_dot_org_fetch_number $n $nick $c"\r\n	}\r\n\r\n	set query $query_prefix$query_suffix_number$n\r\n\r\n	http::config -useragent $agent\r\n\r\n	if { $exposed_use_blocking_number_fetch == 0 } {\r\n		set token [http::geturl $query -command exposedCallback_number]\r\n		set exposed_nick_token_hash($token) $nick\r\n		set exposed_channel_token_hash($token) $c\r\n	} else {\r\n		set token [http::geturl $query]\r\n		set exposed_nick_token_hash($token) $nick\r\n		set exposed_channel_token_hash($token) $c\r\n		exposedCallback_number $token\r\n	}\r\n\r\n}\r\n\r\nproc exposed_dot_org_fetch_random { } {\r\n\r\n	global agent\r\n	global query_prefix\r\n	global query_suffix_random\r\n	global exposed_lock\r\n	global exposed_command\r\n	global exposed_errortext_fetch_locked\r\n	global exposed_ver\r\n	global exposed_enable_debug\r\n	global exposed_use_blocking_random_fetch\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposed_dot_org_fetch_random"\r\n	}\r\n\r\n	set exposed_lock [clock clicks -milliseconds]\r\n\r\n	http::config -useragent $agent\r\n\r\n	if { $exposed_use_blocking_random_fetch == 0 } {\r\n		set token [http::geturl $query_prefix$query_suffix_random -command exposedCallback_random]\r\n	} else {\r\n		set token [http::geturl $query_prefix$query_suffix_random]\r\n		exposedCallback_random $token\r\n	}\r\n\r\n}\r\n\r\nproc exposedCallback_number { token } {\r\n\r\n	global exposed_result_regexp\r\n	global exposed_command\r\n	global exposed_text_quote_not_found\r\n	global exposed_enable_debug\r\n	global exposed_nick_token_hash\r\n	global exposed_channel_token_hash\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposedCallback_number $token"\r\n	}\r\n\r\n	set nick $exposed_nick_token_hash($token)\r\n	set c $exposed_channel_token_hash($token)\r\n	unset exposed_nick_token_hash($token)\r\n	unset exposed_channel_token_hash($token)\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposedCallback_number $token $nick $c"\r\n	}\r\n\r\n	catch {\r\n\r\n		set result [http::data $token]\r\n		unset $token\r\n\r\n		if { [regexp $exposed_result_regexp $result tmp data] == 1} {\r\n			exposed_output $data -1 $c $nick 0\r\n		} else {\r\n			op $exposed_text_quote_not_found $c\r\n		}\r\n\r\n		return 1\r\n\r\n	} blah\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog $blah\r\n	}\r\n\r\n	return 0\r\n\r\n}\r\n\r\nproc exposedCallback_random { token } {\r\n\r\n	global exposed_lock\r\n	global exposed_cache\r\n	global exposed_cache_pointer_position\r\n	global exposed_result_regexp\r\n	global exposed_number_regexp\r\n	global exposed_number_list\r\n	global exposed_command\r\n	global exposed_errortext_infinite_loop\r\n	global exposed_ver\r\n	global exposed_enable_debug\r\n	global exposed_max_public_line_length\r\n	global exposed_newline_regexp\r\n\r\n	set exposed_cache [list]\r\n	set exposed_number_list [list]\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog "exposedCallback_random $token"\r\n	}\r\n\r\n	catch {\r\n\r\n		set result [http::data $token]\r\n		unset $token\r\n\r\n		set safety_measure 0\r\n		set limit [expr $exposed_max_public_line_length + 1]\r\n\r\n		while { [regexp $exposed_result_regexp $result tmp data the_rest] } {\r\n\r\n			if { [regexp "(.*$exposed_newline_regexp.*){$limit}" $data] == 0 } {\r\n				if { [regexp $exposed_number_regexp $result blah numero] == 1 } {\r\n					lappend exposed_number_list $numero\r\n				} else {\r\n					lappend exposed_number_list -1\r\n				}\r\n				lappend exposed_cache $data\r\n			}\r\n\r\n			set result $the_rest\r\n			incr safety_measure\r\n\r\n			if { $safety_measure > 100 } {\r\n				putlog $exposed_ver $exposed_errortext_infinite_loop\r\n				set exposed_lock 0\r\n				return\r\n			}\r\n		}\r\n\r\n		set exposed_cache_pointer_position 0\r\n		set exposed_lock 0\r\n		return\r\n\r\n	} errorstg\r\n\r\n	if { $exposed_enable_debug } {\r\n		putlog $errorstg\r\n	}\r\n\r\n	set exposed_lock 0\r\n\r\n}\r\n\r\nproc op { o c } {\r\n	putserv "PRIVMSG $c :$o"\r\n}\r\n\r\nexposed_init\r\n\r\nputlog $exposed_text_running\r\n', 0, 'tcl', 'Http Fetch', '#EggTCL');
INSERT INTO `pastebin` VALUES (2446, 'Peter``', '2004-11-25 17:32:17', '/usr/lib/libtcl8.4.so: undefined reference to `__ctype_b_loc@GLIBC_2.3''\r\n/usr/lib/libtcl8.4.so: undefined reference to `pthread_cond_broadcast@GLIBC_2.3.2''\r\n/usr/lib/libtcl8.4.so: undefined reference to `pthread_cond_destroy@GLIBC_2.3.2''\r\n/usr/lib/libtcl8.4.so: undefined reference to `pthread_cond_timedwait@GLIBC_2.3.2''\r\n/usr/lib/libtcl8.4.so: undefined reference to `pthread_cond_wait@GLIBC_2.3.2''\r\n/usr/lib/libtcl8.4.so: undefined reference to `pthread_cond_init@GLIBC_2.3.2''\r\n/usr/lib/libtcl8.4.so: undefined reference to `__ctype_tolower_loc@GLIBC_2.3''\r\n/usr/lib/libtcl8.4.so: undefined reference to `realpath@GLIBC_2.3''\r\ncollect2: ld returned 1 exit status\r\nmake[1]: *** [../eggdrop] Error 1\r\nmake[1]: Leaving directory `/home/hejog/eggdrop1.6.16/src''\r\nmake: *** [modegg] Error 2\r\n', 0, 'none', 'eggdrop compile error', 'none');
INSERT INTO `pastebin` VALUES (2447, 'EmOuBi', '2004-11-26 09:18:52', 'bind pub -|- !trigger pub_bor\r\n\r\nproc pub_bor {nick mask hand channel args} {\r\n   global bor\r\n   puthelp "PRIVMSG $channel :[lindex $bor [rand [llength $bor]]]"\r\n   }\r\nset bor {\r\n"quote with 700+ letters"\r\n}\r\n', 0, 'none', 'how to make quotes larger than 448 letters', '#EggTCL');
INSERT INTO `pastebin` VALUES (2448, 'cesco__', '2004-11-26 09:57:55', 'proc GetValue {var {default ""}} { upvar $var curvar; return [expr {[info exists curvar]?$curvar:$default}] }\r\n\r\n			proc StripColors {text} {\r\n			regsub -all -- {\\003[0-9]{0,2}(?:,[0-9]{1,2})?|\\017|\\037|\\002|\\026|\\007} $text {} text\r\n				return $text\r\n			}\r\n			\r\n			proc GetColors {text} {\r\n				foreach tag [regexp -all -inline {\\003[0-9]{0,2}(?:,[0-9]{1,2})?|\\017|\\037|\\002|\\026|\\007} $text] {\r\n					switch [set type [string index $tag 0]] {\r\n						"" {\r\n							set split [split [string range $tag 1 e] ","]\r\n							if {[set tmp [lindex $split 0]] != ""} {\r\n								set color 1\r\n								set color1 $tmp\r\n								if {[set tmp [lindex $split 1]] != ""} { set color2 $tmp }\r\n							} else { Define 0 "color color1 color2" }\r\n						}\r\n						"" - "" - "" { Tokens 1 extra $type }\r\n						"" { Define 0 "extra color" }\r\n					}\r\n				}\r\n				return "[expr {[GetValue color 0]?"$color1[expr {[info exists color2]?",$color2":""}]":""}][join [GetValue extra] ""]"\r\n			}\r\n			\r\n			#cambiare nome di questa funzione\r\n			proc TextJustify {text {size 80} {split 0} {rientro 0}} {\r\n				foreach line $text {\r\n					set split [split $line " "]\r\n					set howmany [llength $split]\r\n					set cur 0\r\n					set curcolors ""\r\n					set dorientro 0\r\n					set curline ""\r\n					set linelen 0\r\n					foreach word $split {\r\n						set wordlen [string length [StripColors $word]]\r\n						if {$curline != ""} { incr wordlen }\r\n						for {set i 0} {$i < 3} {incr i} {\r\n							if {$i == 1} {\r\n								lappend curline $word\r\n								incr linelen $wordlen\r\n								incr cur\r\n							} elseif {($i == 0 && ($wordlen + $linelen) > $size || ($linelen == "" && $wordlen > $size)) || ($i == 2 && ($cur == $howmany))} {\r\n								lappend return [set tmp "$curcolors[expr {$dorientro?"[string repeat " " $rientro]":""}][join $curline " "]"]\r\n								set curcolors [GetColors $tmp]\r\n								set curline ""\r\n								set linelen $rientro\r\n								set dorientro 1\r\n							}\r\n						}\r\n					}\r\n				}\r\n				return [GetValue return]\r\n			}\r\n', 0, 'tcl', 'split lines without losing colors', '#TCL');
INSERT INTO `pastebin` VALUES (2449, 'Hejog', '2004-11-26 11:27:38', 'make[1]: Leaving directory `/home/hejog/eggdrop1.6.15/src''\r\n\r\n./eggdrop: /lib/libc.so.6: version `GLIBC_2.3'' not found (required by /usr/lib/l\r\nibtcl8.4.so)\r\n./eggdrop: /lib/libpthread.so.0: version `GLIBC_2.3.2'' not found (required by /u\r\nsr/lib/libtcl8.4.so)\r\nmake: *** [modegg] Error 1\r\n', 0, 'none', 'eggdrop', 'none');
INSERT INTO `pastebin` VALUES (2479, 'RA3OR', '2004-12-06 09:19:33', '; UTHelpER v0.1 Alpha\r\n; created by RA3OR\r\n; Email: admin@ra3or.tk Website: http://www.ra3or.tk\r\n; To load this script place this file in your main irc folder and type \r\n; /load -rs UTHelpER.mrc\r\n\r\nalias -l UTHelpER {\r\n  set %uth.ver 4v0.1 Alpha\r\n  set %uth.author 14RA3OR\r\n  set %uth.server UTChat\r\n  set %uth.chan #ut\r\n}\r\n\r\non *:START:{\r\n  UTHelpER\r\n  echo 14--> 5-=7UTH14elp7ER5=- %uth.ver 7I14nitialized !\r\n}\r\n\r\non *:LOAD:{\r\n  UTHelpER\r\n  echo -a 14-=UTHelpER=- 4Initialized 1... 7Thank You For Loading UTHelpER %uth.ver 7Script1.\r\n  echo -a Script Made by 8,0¤0,8¤7,8¤8,7¤4,7¤7,4¤5,4¤4,5¤1,5¤5,1¤ RA3OR 5,1¤1,5¤4,5¤5,4¤7,4¤4,7¤8,7¤7,8¤0,8¤8,0¤\r\n}\r\n\r\non *:UNLOAD:{\r\n  UTHelpER\r\n  unset %uth*\r\n  echo -a 14-=UTHelpER=- 4Unloaded 1... 7Thank You For Using UTHelpER %uth.ver 7Script1.\r\n}\r\n\r\n;UIdent on\r\n;on *:JOIN:#:{\r\nif ( $network == %uth.server ) {\r\n  if ( $chan == %uth.chan ) {\r\n    if (*!*u???????@* iswm $fulladdress) {\r\n      ctcp $nick version \r\n    }\r\n  }\r\n}\r\n;}\r\non 1:CTCPREPLY:VERSION*:{\r\n  if (400 isin $6) { .msg $nick TO Play UT Online Go HERE ---->  http://www.3dgamers.com/dl/games/unrealtourn/utpatch436nodelta.exe.html OR HERE: http://official.beyondunreal.com/dl.php/official/ut/utpatch436nodelta.exe ( 32.2 MB ) then Get the bonus packs #1 (13.8MB), #3 (4.8MB), and #4 (14.2MB) here : http://www.utchat.com/help/downloads/ut/index.htm | //msg #ut  $nick : [ $+ Sending Version 400 Update to 436 info In Private Message] | halt }\r\n  if (405 isin $6) { .msg $nick TO Play UT Online Go HERE ---->  http://www.3dgamers.com/dl/games/unrealtourn/utpatch436nodelta.exe.html OR HERE: http://official.beyondunreal.com/dl.php/official/ut/utpatch436nodelta.exe ( 32.2 MB ) then Get the bonus packs #1 (13.8MB), #3 (4.8MB), and #4 (14.2MB) here : http://www.utchat.com/help/downloads/ut/index.htm | //msg #ut  $nick : [ $+ Sending Version 405 Update to 436 info In Private Message] | halt }  \r\n  if (413 isin $6) { .msg $nick TO Play UT Online Go HERE ---->  ftp://ftp.edome.net/mirror/beyondunreal/official/ut/utpatch436.exe Get the 436 umod Patch (7mb) as your version isn''t compatible with most Servers Note: this is Not Optional. Also get bonus-packs #1(14MB), #3(4.8MB), #4(14MB) here : http://www.utchat.com/help/downloads/ut/index.htm | //msg #ut  $nick : [ $+ Sending Version 413 Update to 436 info In Private Message] | halt }  \r\n  if (428 isin $6) { .msg $nick TO Play UT Online Go HERE ---->  http://www.beyondunreal.com/dl.php/official/ut/utpatch436nodelta.exe (33mb) You need to upgrade in order to play online. Creative patch for UT version 428, compatible with your soundcard then Get the bonus packs #1 (13.8MB), #3 (4.8MB), and #4 (14.2MB) here : http://www.utchat.com/help/downloads/ut/index.htm | //msg #ut  $nick : [ $+ Sending Version 428 Update to 436 info In Private Message] | halt }  \r\n  if (432 isin $6) { .msg $nick Update Your Version of UT here: ftp://ftp.edome.net/mirror/beyondunreal/official/ut/utpatch436.exe and install all bonuspacks from CD2 of your UT GOTY edition | //msg #ut  $nick : [ $+ Sending Version 432 Update to 436 info In Private Message] | halt }  \r\n  if (440 isin $6) { .msg $nick That Version [ 440 ] is Recommended for Dedicated Servers ONLY. For Clients, Recommended Version is 436. | //msg #ut  $nick : [ $+ Sending Version 440 Info In Private Message] | halt }\r\n  if (451 isin $6) { .msg $nick That Version [ 451 ] is Recommended for Dedicated Servers ONLY. For Clients, Recommended Version is 436. | //msg #ut  $nick : [ $+ Sending Version 451 Info In Private Message] | halt }\r\n  elseif (436 isin $6) { .echo -a 4*** 5INFO:4 $nick 14CHECKS OUT WITH VERSION4 436 14LOLZ }\r\n}\r\n;UIdent END\r\n\r\nmenu Channel,NickList {\r\n  - Â• Â• Â• Â• $chr(32) $iif($network != UTChat,$network,UTHelpER) $chr(32) Â• Â• Â• Â• - :.\r\n  Version $$1:/ctcp $$1 version\r\n  UT99\r\n  .UPdate for $$1://say 4(14[4 $$1 14]4) 7You need to update? 10You 4MUST HAVE10 the 12Original10 disk to 4I10nstall this ... 4Down10load the4 436 U10pdate 4F10or2 UT997 - 2http://www.utchat.com/files/utpatch436.exe 10also get 4B7onus 4P7acks4 1 10and4 4 ...4 3 10is 4O10ptional ...\r\n  .BonusPacks for $$1://say 4(14[4 $$1 14]4) 4Down10load the 4B7onus 4P7acks10 here:2 http://www.unrealtournament.com/utgoty/downloads.php\r\n  UT2003\r\n  .ASE on $$1://say 4(14[4 $$1 14]4)14 [4ATTENTION14]10 The 2UT2003 4M2aster 2S10er2v10er10 is no longer listing 2S10er2v10ers 7-10 So use 7ASE 4(7All Seeing Eye4)2 http://www.udpsoft.com/eye/ 10or use 7GameSpy Arcade 4(10This one prolly works much better4)2 http://www.gamespyarcade.com 10or7 KQuery 4.0 2http://www.kquery.com/index.php?page=software_info&subpage=1&id=2 10to get 2S10er2v10ers from now on ...  \r\n  UT2004\r\n  .Demo3120 on $$1://say 4(14[4 $$1 14]4) 2UT2004 4V10ersion4 3120 DEMO10 is no longer supported,10 make sure you 4U10n7I10nstall the 4OLD DEMO10 first...get the 5NEW4 DEMO10 here:2 http://www.utchat.com/downloads.htm 7-10 this new 4DEMO10 lets 4R10egular 4V10ersion people play the 4DEMO 2S10er2v10ers ... \r\n  CHAN MANGEMENT\r\n  .No Spam://say 4(14[4 $$1 14]4)4 P10lease, 4N10o 4S10paming7!\r\n  .No Caps://say 4(14[4 $$1 14]4) 4N10o 4C10aps7!4 P10lease 4U10n4L10ock your 4C7aps4L7ock 4K10ey 4(14 If locked 4)  \r\n  .No Repeat://say 4(14[4 $$1 14]4)4 P10lease do 4N10ot 4R10epeat,10 we heard you 4A10lready ...\r\n  .No SEX://say 4(14[4 $$1 14]4) 4N10o 4SEX I10nvite,4 P10lease !   \r\n  .No Poking://say 4(14[4 $$1 14]4) 4N10o14 $me 4P10oking,4 P10lease !  \r\n  -\r\n}\r\nmenu MenuBar {\r\n  -\r\n  - Â• Â• Â• Â• Â• $chr(32) UTHelpER $chr(32) Â• Â• Â• Â• Â• - \r\n  .About: echo -a 4*** 5INFO: 7This Lil Script was made for Helping n00bs who Join UTChat 15( 14by 14RA3OR 15)\r\n  .UnLoad\r\n  ..Are you sure ???: unload -rs " $+ $script $+ "\r\n  -\r\n}\r\n', 0, 'none', 'UTHelpER.mrc', 'none');
INSERT INTO `pastebin` VALUES (2322, 'Robb', '2004-10-26 17:57:44', 'bind pub -|- !release HDM:rel\r\nproc HDM:rel {nick host hand chan arg} {\r\nset release $arg\r\narray set datum "Dead.Sexy.2000.DVDRip.XviD-HDM {10.19.04} Diary.Of.A.Sex.Addict.2001.DVDRip.XviD-HDM {10.13.04} Armageddon.1998.INTERNAL.DVDRip.XviD-HDM {10.07.04} Air.Force.One.1997.INTERNAL.DVDRip.XviD-HDM {10.05.04} Snowy.Is.Da.Man.2004.DVDRip.XviD-HDM {10.05.04}"\r\nif {[catch {set datum($arg)} err]} {putserv "PRIVMSG $chan :Could''nt find that";return}\r\nputserv "PRIVMSG $chan :$release $datum($arg)"\r\nreturn 0\r\n}', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2321, 'leprechau', '2004-10-26 11:11:45', 'int readtclprog(char *fname)\r\n{\r\n  int  code;\r\n  char *script = NULL, *oneline, cryptline[1024];\r\n  FILE  *f;\r\n\r\n  if ((f = fopen(fname, "r")) == NULL)\r\n    return 0;\r\n  \r\n  while (fscanf(f, "\\%[^\\n]\\n", cryptline) != EOF) {\r\n    //printf("cryptline(\\%d) == \\%s\\n", strlen(cryptline), cryptline);\r\n    oneline = rdecrypt_string(FILEKEY, cryptline);\r\n    //printf("oneline(\\%d) == \\%s\\n", strlen(oneline), oneline);\r\n    if (script == NULL) {\r\n      script = nmalloc(strlen(oneline)+2);\r\n      strcpy(script, oneline);\r\n      strcat(script, "\\n");\r\n    }\r\n    else {\r\n      script = (char*) nrealloc(script, strlen(script) + strlen(oneline)+1);\r\n      strcat(script, oneline);\r\n      strcat(script, "\\n");\r\n    }\r\n  }\r\n  fclose(f);\r\n  \r\n  //printf("script(\\%d) == \\%s\\n", strlen(script), script);\r\n  code = Tcl_Eval(interp, script);\r\n  nfree(script);\r\n\r\n  if (code != TCL_OK) {\r\n    putlog(LOG_MISC, "*", "Tcl error in file ''\\%s'':", fname);\r\n    return 0;\r\n  }\r\n\r\n  return 1;\r\n}\r\n', 0, 'c', 'some c code', 'none');
INSERT INTO `pastebin` VALUES (2323, 'Kreven', '2004-10-27 20:15:16', 'set buffer [egghttp:data $foobar]\r\negghttp:cleanup $foobar\r\nputlog "$buffer"', 0, 'tcl', 'egghttp problem...', '#EggTCL');

INSERT INTO `pastebin` VALUES (2290, 'test', '2004-09-26 02:42:05', 'j', 0, 'none', 'test', '#TCL');
INSERT INTO `pastebin` VALUES (2291, 'Chai_T', '2004-09-27 12:49:06', 'set reacts {\r\n"1"\r\n"2"\r\n}\r\nset text {\r\n"test"\r\n"blue"\r\n}\r\nbind ctcp - ACTION:talk\r\nproc talk { nick host chan reacts text args } {\r\n        global reacts\r\n        global text\r\n        if {[string match -nocase "ACTION" $text]!=1} {return 0}\r\n        if {[string match -nocase $reacts [join $args]]!=0}\r\n        putserv "PRVMSG $chan :\\001ACTION :[lindex $reacts [rand [llength $react\r\ns]]]\\001"\r\n  }', 0, 'tcl', 'react', '#EggTCL');
INSERT INTO `pastebin` VALUES (2292, 'Ninave', '2004-09-29 10:56:40', 'from the start it where \r\n\r\n[17:54] missing close-brace\r\n    while executing\r\n"proc do_ques { global webfile lynxfile web_update botnick webtz lynxfilerf pic} {"\r\n\r\n\r\nsense I didnt find any } behind that... I just deleted the last braclet... then this problem accurd\r\n\r\n[17:50] wrong # args: should be "proc name args body"\r\n    while executing\r\n"proc do_ques { global webfile lynxfile web_update botnick webtz lynxfilerf pic}"\r\n\r\n', 0, 'tcl', 'tcl problem', '#TCL');
INSERT INTO `pastebin` VALUES (2314, 'Pixelz', '2004-10-15 01:49:45', 'oink?', 0, 'tcl', 'testing 1 2 3', '#EggTCL');
INSERT INTO `pastebin` VALUES (2319, 'Atoms', '2004-10-21 18:06:23', 'package require mytcl\r\n\r\nset sqlhost "localhost"\r\nset sqluser "*****"\r\nset sqlpassword "******"\r\nset sqldbname "*******"\r\nset sqltablename "*****"\r\nset maxskaic 0\r\nset kur(chans) "#caurums"\r\n\r\nbind pubm - "*ornis*" runaajam\r\nbind pub - !addbad addbad\r\n\r\nproc addbad {nick uhost hand chan text} {\r\n		if {$text == ""} {\r\n		putserv "notice $nick :pieliec slikto vaardu"\r\n		return 0\r\n		}\r\n		set fd2 [open scripts/badwords.txt a]\r\n		puts $fd2 $text\r\n		putserv "notice $nick :pieliku slikto vaardu -> $text"\r\n		close $fd2\r\n}\r\nproc badcheck {nick uhost hand chan text} {\r\n	global kur\r\n	set wrong 0\r\n	set out [open scripts/badwords.txt r]\r\n	while {![eof $out]} {\r\n	set badwords [gets $out]\r\n	}\r\n	close $input\r\n	foreach t $text b $kur(badwords) { if {[string tolower $t] == [string tolower $b]} { set wrong 1 }}\r\n	return $wrong\r\n}\r\n\r\nproc checktext {nick uhost hand chan text} {\r\n	set wrong 0\r\n	set users [chanlist $chan]\r\n	foreach t $text u $users { if {[string tolower $t] == [string tolower $u]} { set wrong 1 }}\r\n	return $wrong\r\n}\r\n\r\nproc validchan {chan} {\r\n   global kur ; set valid 0\r\n   foreach channel $kur(chans) { if {$channel == [string tolower $chan]} { set valid 1 }}\r\n   return $valid\r\n}\r\n\r\nproc runaajam { nick uhost hand chan text } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick irjautziim\r\n  if {![validchan $chan]} { return 0 }\r\n  set connectsql [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsql $sqldbname\r\n  set maxskaic 0\r\n  set irjautziim 0\r\n  resetdb\r\n  if {[expr [string length $text]-[string length "bobis"]] > 3} {\r\n    regsub -all -nocase $botnick $text \\%niks text\r\n    regsub -all -nocase [string range $botnick 0 [expr [string len $botnick] -2]] $text \\%niks text\r\n    sql query $connectsql "select * from $sqltablename where teksc = ''[mysqlescape $text]''"\r\n    set tt 0\r\n    set tt [sql numrows $connectsql]\r\n    if {$tt == 0} {\r\n      piemekltxt $chan $nick $text\r\n			if {![checktext $nick $uhost $hand $chan $text]} { return 0 }\r\n			if {![badcheck $nick $uhost $hand $chan $text]} { return 0 }\r\n			sql exec $connectsql "insert into $sqltablename (teksc) values(''[mysqlescape $text]'')"\r\n    } else {\r\n      piemekltxt $chan $nick $text\r\n    }\r\n  } else {\r\n    randtext $chan $nick\r\n  }\r\n  sql disconnect $connectsql\r\n}\r\n\r\nproc randtext { chan nick } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick irjautaajumziime\r\n  if {![validchan $chan]} { return 0 }\r\n	set connectsqldivi [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsqldivi $sqldbname\r\n  set co [sql query $connectsqldivi "select * from $sqltablename ORDER BY RAND() limit 1"]\r\n  while { [set row [sql fetchrow $connectsqldivi $co]] != "" } {\r\n    set atbilde [lindex $row 1]\r\n    regsub -all \\%niks $atbilde $nick atbilde\r\n		set garums [string length $atbilde]\r\n		set timeout [expr $garums / 4]\r\n		utimer $timeout { putserv "PRIVMSG $chan : $timeout ... $atbilde" }\r\n		break\r\n  }\r\n  sql disconnect $connectsqldivi\r\n}\r\n\r\nproc resetdb { } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick\r\n  set connectsqltriis [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsqltriis $sqldbname\r\n  set codivi [sql query $connectsqltriis "select * from $sqltablename where skaic <> ''0''"]\r\n  while { [set row [sql fetchrow $connectsqltriis $codivi]] != "" } {\r\n    set idnum [lindex $row 0]\r\n    sql exec $connectsqltriis "UPDATE $sqltablename SET skaic=''0'' WHERE id=''$idnum''"\r\n  }\r\n  sql disconnect $connectsqltriis\r\n}\r\n\r\nproc piemekltxt { chan nick text } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick maxskaic\r\n	set connectsqlchetri [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsqlchetri $sqldbname\r\n  set izlasiitie ""\r\n  for {set i 0} {$i < [llength $text]} {incr i} {\r\n    if { [string length [lrange $text $i $i]] > 3 && [lrange $text $i $i] != "\\%niks" } {\r\n      lappend izlasiitie "[lrange $text $i $i]"\r\n    }\r\n  }\r\n  if {$izlasiitie != ""} {\r\n    for {set i 0} {$i < [llength $izlasiitie]} {incr i} {\r\n      set cotriis [sql query $connectsqlchetri "select * from $sqltablename where teksc like ''\\%[lrange $izlasiitie $i $i]\\%''"]\r\n      if { [sql numrows $connectsqlchetri] != 0 } {\r\n        while { [set row [sql fetchrow $connectsqlchetri $cotriis]] != "" } {\r\n          set idnum [lindex $row 0]\r\n          set konkskaic [expr [lindex $row 2]+1]\r\n          sql exec $connectsqlchetri "UPDATE $sqltablename SET skaic=''$konkskaic'' WHERE id=''$idnum''"\r\n          if {$maxskaic < $konkskaic} { set maxskaic $konkskaic }\r\n        }\r\n\r\n      }\r\n    sql endquery $connectsqlchetri $cotriis\r\n    }\r\n  atlasiitpeecskaic $chan $nick $text\r\n  } else {\r\n    randtext $chan $nick\r\n  }\r\n  sql disconnect $connectsqlchetri\r\n}\r\n\r\nproc atlasiitpeecskaic { chan nick text } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick maxskaic irjautaajumziime\r\n  if {![validchan $chan]} { return 0 }\r\n  set connectsqlpieci [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsqlpieci $sqldbname\r\n  set skaitish $maxskaic\r\n  set vajag 0\r\n  set cochetri [sql query $connectsqlpieci "select * from $sqltablename where (teksc <> ''$text'') and (skaic = ''$skaitish'') ORDER BY RAND() LIMIT 5"]\r\n  if { [sql numrows $connectsqlpieci] <= 1 && $skaitish >= 1 } {\r\n    sql endquery $connectsqlpieci $cochetri\r\n    set cochetri [sql query $connectsqlpieci "select * from $sqltablename where (teksc <> ''$text'') and (skaic = ''[expr $skaitish - 1]'') ORDER BY RAND() LIMIT 2"]\r\n  }\r\n  if { [sql numrows $connectsqlpieci] != 0 } {\r\n    while { [set row [sql fetchrow $connectsqlpieci $cochetri]] != "" } {\r\n      set atbilde [lindex $row 1]\r\n      regsub -all \\%niks $atbilde $nick atbilde\r\n			set garums [string length $atbilde]\r\n			set timeout [expr $garums / 4]\r\n			utimer $timeout { putserv "PRIVMSG $chan : $timeout ... $atbilde" }\r\n      break\r\n    }\r\n  } else { randtext $chan $nick }\r\n  sql disconnect $connectsqlpieci\r\n}\r\nbind pub - !smadzene smadzene\r\nproc smadzene { nick uhost hand chan text } {\r\n  global sqlhost sqluser sqlpassword sqldbname sqltablename botnick\r\n  if {![validchan $chan]} { return 0 }\r\n  set connectsqlseshi [sql connect $sqlhost $sqluser $sqlpassword]\r\n  sql selectdb $connectsqlseshi $sqldbname\r\n  set lielumz 0\r\n  set rindinjas 0\r\n  set copieci [sql query $connectsqlseshi "SHOW TABLE STATUS"]\r\n  while { [set row [sql fetchrow $connectsqlseshi $copieci]] != "" } {\r\n    set rindinjas [lindex $row 3]\r\n    set lielumz [expr [lindex $row 5] + [lindex $row 7]]\r\n  }\r\n  putserv "NOTICE $chan :Manaas smadzenees ir $rindinjas rindinjas un tas kopaa ir apmeeram [expr $lielumz/1024] KB :)p !!!"\r\n  sql disconnect $connectsqlseshi\r\n}\r\nputlog "Loading bobis script"\r\n', 0, 'tcl', 'talking ...', 'none');
INSERT INTO `pastebin` VALUES (2450, 't0mb0y', '2004-11-26 16:20:32', 'until [ -n "$runscript" ]; do\r\n    echo -n "Are you sure you wish to continue? [Y]es [N]o: "\r\n    read runscript\r\n    case $runscript in\r\n        [yY]) echo "Continuing the installation" ;;\r\n        [nN]) echo "Aborting."; exit 1 ;;\r\n        *) unset runscript; continue ;;\r\n    esac\r\ndone\r\n', 0, 'bash', 'none', 'none');
INSERT INTO `pastebin` VALUES (2297, '|314|', '2004-10-01 11:34:31', 'bind pub - !add Main\r\n\r\nproc pub:Main {nick uhost handle chan args} {\r\n\r\nset stre [lindex $stre 0]\r\nset fg [open /glftpd/ftp-data/misc/affils.txt a]\r\n\r\n        putserv "PRIVMSG #ace : $stre"\r\n        puts $fg $stre nonewline\r\n        puts $fg " " nonewline\r\n\r\nclose $fg\r\n\r\n}\r\n', 0, 'tcl', 'Tcl error [Main]: wrong # args: should be &quot;lindex list index&quot;', '#TCL');
INSERT INTO `pastebin` VALUES (2298, '|314|', '2004-10-01 11:35:47', 'bind pub - !add Main\r\n\r\nproc pub:Main {nick uhost handle chan args} {\r\n\r\nset stre [lindex $stre 0]\r\nset fg [open /glftpd/ftp-data/misc/affils.txt a]\r\n\r\n        putserv "PRIVMSG #ace : $stre"\r\n        puts $fg $stre nonewline\r\n        puts $fg " " nonewline\r\n\r\nclose $fg\r\n\r\n}\r\n', 0, 'tcl', 'Tcl error [Main]: wrong # args: should be &quot;lindex list index&quot;', '#TCL');
INSERT INTO `pastebin` VALUES (2305, 'neverclear', '2004-10-04 15:17:06', 'bind join - * join:master\r\nproc join:master { nick } {\r\nif {[string match -nocase "neverclear" $nick]}{\r\nputhelp "PRIVMSG $chan :Welcome Master"\r\n}\r\n}\r\nputlog "loaded master.tcl"\r\n', 0, 'tcl', 'onjoin', 'none');
INSERT INTO `pastebin` VALUES (2361, 'mroud', '2004-11-08 13:21:04', 'set script_bin {/home/egg/scripts/script.sh}\r\nset my_channel "#chan"\r\n\r\nproc script_proc_bind_cmd {nick uhost hand chan text} {\r\n         if {![string equal [lrange [split $text] 0 1] "hello world"]} {return}\r\n         set text [lrange [split $text] 2 end]\r\n         set output [exec $::script_bin [lindex $text 0]]\r\n         putserv "PRIVMSG $my_channel :$output"\r\n}\r\n\r\nbind pubm -|- "*hello world*" script_proc_bind_cmd', 0, 'tcl', 'for leprechau', '#EggTCL');
INSERT INTO `pastebin` VALUES (2362, 'leprechau', '2004-11-08 13:44:27', 'set script_bin {/home/egg/scripts/script.sh}\r\n\r\n## depending on what you are wanting...you can probably remove this setting and just use $chan now\r\nset my_channel "#chan"\r\n\r\n## set the flag here\r\nsetudef flag script\r\n\r\nproc script_proc_bind_cmd {nick uhost hand chan text} {\r\n\r\n         ## check if this channel is set +script\r\n         #if {![channel get $chan script]} {return}\r\n         #if {![string equal [lrange [split $text] 0 1] "hello world"]} {return}\r\n\r\n         ## we could also combine both of these if statements into one\r\n         if {![channel get $chan script] || ![string equal [lrange [split $text] 0 1] "hello world"]} {return}\r\n\r\n         set text [lrange [split $text] 2 end]\r\n         set output [exec $::script_bin [lindex $text 0]]\r\n         ## since we are only working on certain channels now...we can change this to just $chan if you want\r\n         putserv "PRIVMSG $::my_channel :$output"\r\n}\r\n\r\nbind pubm -|- "*hello world*" script_proc_bind_cmd', 2361, 'tcl', 'more stuff for mroud', '#EggTCL');
INSERT INTO `pastebin` VALUES (2302, 'sablar', '2004-10-03 19:39:12', 'proc start {} {\r\n	font create irssi -family "Courier New" -size 10\r\n	wm geometry . 800x500\r\n	wm title . "main"\r\n	frame .r -relief flat\r\n	pack .r -side top -fill y -anchor w\r\n	frame .r.n -bd 1 -relief sunken\r\n	frame .r.c -bd 1 -relief sunken\r\n	#pack .r.n -side left -anchor w -fill both\r\n	#pack .r.c -side left -anchor w -fill both\r\n	grid .r.n -column 0 -row 0\r\n	grid .r.c -column 1 -row 0\r\n	grid columnconfigure .r.n 0 -uniform 1 -weight 1\r\n	grid columnconfigure .r.c 1 -uniform 1 -weight 1\r\n	label .r.n.label -height 6 -text "WIN1" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	label .r.c.label -height 6 -text "WIN2" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	#pack .r.c.label -side bottom -fill y\r\n	#pack .r.n.label -side bottom -fill y\r\n	grid .r.n.label -column 0 -row 0\r\n	grid .r.c.label -column 1 -row 0\r\n	grid columnconfigure .r.n.label 0 -uniform 1 -weight 1\r\n	grid columnconfigure .r.c.label 1 -uniform 1 -weight 1\r\n\r\n	frame .status -bd 1 -relief sunken\r\n	pack .status -side top -fill x\r\n	label .status.label -height 6 -text "STATUS" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	pack .status.label -side top -fill x\r\n\r\n	frame .channel -bd 1 -relief sunken\r\n	pack .channel -side top -fill both -expand 1\r\n	label .channel.label -text "CHANNEL" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	pack .channel.label -side top -fill both -expand 1\r\n\r\n\r\n}', 0, 'tcl', 'tk', '#TCL');
INSERT INTO `pastebin` VALUES (2299, '|314|', '2004-10-01 12:07:40', '## Im getting this: "[19:08] Tcl error [Main]: can''t read "a": no such variable"\r\n\r\nbind pub - !find Main\r\n\r\nproc Main {nick uhost handle chan args} {\r\n\r\nset fg [open "/glftpd/ftp-data/logs/glftpd.log" "r"]\r\n        set a [lindex $a 0]\r\n        while {![eof $fg]} {\r\n        set line [gets $fg]\r\n\r\n        if {[string match $a $line]} {\r\n\r\n        putserv "PRIVMSG #ace : I found $a on the site"\r\n        break\r\n        } else {\r\n\r\n        putserv "PRIVMSG #ace : Sry couldnt find $a on the site"\r\n}\r\n}\r\n\r\nclose $fg\r\n\r\n', 0, 'none', 'Heya', 'none');
INSERT INTO `pastebin` VALUES (2304, 'serax', '2004-10-04 10:20:39', '#!/usr/bin/tclsh\r\n\r\nset unban 1\r\nset nick "serax"\r\nset chan "#blah"\r\n\r\nproc query {msg} {\r\n  global unban\r\n  puts "$msg"\r\n  set unban 0\r\n}\r\n\r\nputs "MODE $chan +b *$nick*!*@*"\r\nset blah "MODE $chan -b *$nick*!*@*"\r\nafter 3000 query {"$blah"}\r\nset blah "blah"\r\n\r\nvwait unban', 0, 'tcl', 'problems with variables in after event', '#TCL');
INSERT INTO `pastebin` VALUES (2344, 'Juzzy', '2004-11-05 21:08:11', 'int add_ip(char *addr,unsigned int nip, short type) {\r\n	unsigned long totaltime;\r\n	//void *val;\r\n	char **val=NULL;\r\n	struct in_addr tmpip;\r\n	struct t_node *node=NULL;\r\n	int dodns=0;\r\n	//char *rr=NULL;\r\n	printf("Add_ip %u %d\\n",nip,type);\r\n    node=xmalloc(sizeof(struct t_node));\r\n\r\n	//set time\r\n	struct timeval now;\r\n	struct timezone dtz;\r\n	gettimeofday(&now, &dtz);\r\n	totaltime = now.tv_sec;\r\n#ifdef DEBUG\r\n	DPRINTF("type: %d\\n",type);\r\n	twalk(cache, action);\r\n#endif\r\n\r\n	switch (type) {\r\n		//bad ips\r\n		case IP_RBL:\r\n			dodns=0;\r\n			totaltime += WEEK;\r\n			break;\r\n		case IP_XUSA:\r\n			dodns=1;\r\n			totaltime += WEEK * 4;\r\n			break;\r\n		case IP_BANNED:\r\n			totaltime += MONTH * 24;\r\n			break;\r\n		case IP_DYN:\r\n			totaltime += WEEK * 4;\r\n			break;\r\n		case IP_VIOLATION:\r\n			totaltime += HOUR * global.bantime;\r\n			break;\r\n\r\n		//good ips\r\n		case IP_GOOD:\r\n			totaltime += DAY;\r\n			dodns=1;\r\n			break;\r\n		case IP_TRUSTED:\r\n			dodns=0;\r\n			totaltime += MONTH * 24;\r\n			break;\r\n		case IP_OLD:\r\n			totaltime -= MONTH;\r\n			break;\r\n\r\n		//in case we forget someone, assume the worse\r\n		default:\r\n			type=IP_BANNED;\r\n			totaltime += WEEK * 4;\r\n	}\r\n\r\n	if (nip == 0) { //numeric ip is not passed\r\n		if(inet_aton(addr,&tmpip) != 1){\r\n			free(node);\r\n			return IP_BANNED;\r\n		}\r\n		node->ip = tmpip.s_addr;\r\n	} else \r\n		node->ip = nip;\r\n\r\n	node->status = type;\r\n	node->expire = totaltime;\r\n	node->rr = NULL;\r\n	if (dodns)\r\n		node->rr = getrr(node->ip,NULL);\r\n\r\n	printf("adding ''%u'' -> (%d)\\n",node->ip,node->status);\r\n\r\n	pthread_mutex_lock(&m_cache);\r\n	val = tsearch(node, &cache, compare);\r\n	pthread_mutex_unlock(&m_cache);\r\n	if ((struct t_node *) *val != node)\r\n		printf("add ip val != node\\n");\r\n	//	free(node);\r\n	//printf("Value: %x \\n\\n",node2.ip);\r\n	return 0;\r\n}', 0, 'c', 'add ip', 'none');
INSERT INTO `pastebin` VALUES (2452, 'Virezz', '2004-11-27 07:19:06', '[14:09] wrong # args: should be "bind type flags cmd/mask ?procname?"\r\n    while executing\r\n"bind pub - !trigger proc proc_trigger"\r\n    (file "scripts/test.tcl" line 1)\r\n    invoked from within\r\n"source scripts/test.tcl"\r\n    (file "war.conf" line 1344)\r\n[14:09] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)\r\n', 0, 'tcl', 'script error', '#EggTCL');
INSERT INTO `pastebin` VALUES (2453, 'gozzer', '2004-11-27 07:20:01', 'bind pub - !trigger proc proc_trigger\r\n\r\nshould be:\r\n\r\nbind pub - !trigger proc_trigger', 2452, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2454, 'Virezz', '2004-11-27 07:21:08', 'bind pub - !trigger proc proc_trigger\r\n\r\nshould be:\r\n\r\nbind pub - !trigger proc_trigger\r\n\r\n----\r\n\r\n\r\n[14:11] Tcl error in file ''war.conf'':\r\n[14:11] invalid command name "nick host handle chan text"\r\n    while executing\r\n"{nick host handle chan text} { putserv "PRIVMSG $chan :hello im a eggdrop" }"\r\n    (file "scripts/test.tcl" line 1)\r\n    invoked from within\r\n"source scripts/test.tcl"\r\n    (file "war.conf" line 1344)\r\n[14:11] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)\r\n-----\r\n', 2453, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2451, 'Virezz', '2004-11-27 07:04:36', '[13:54] wrong # args: should be "proc name args body"\r\n    while executing\r\n"proc {nick host handle channel text} { putserv "PRIVMSG $chan :hello im a eggdrop" }"\r\n    (file "scripts/test.tcl" line 1)\r\n    invoked from within\r\n"source scripts/test.tcl"\r\n    (file "war.conf" line 1344)\r\n[13:54] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)\r\n', 0, 'tcl', 'script error', '#EggTCL');
INSERT INTO `pastebin` VALUES (2455, 'Virezz', '2004-11-27 07:21:22', '[14:11] Tcl error in file ''war.conf'':\r\n[14:11] invalid command name "nick host handle chan text"\r\n    while executing\r\n"{nick host handle chan text} { putserv "PRIVMSG $chan :hello im a eggdrop" }"\r\n    (file "scripts/test.tcl" line 1)\r\n    invoked from within\r\n"source scripts/test.tcl"\r\n    (file "war.conf" line 1344)\r\n[14:11] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)\r\n', 0, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2324, 'K|ll3r', '2004-10-29 10:29:10', 'jalle999', 0, 'tcl', 'tcl scripting about toolz.tcl', '#TCL');
INSERT INTO `pastebin` VALUES (2325, 'K|ll3r', '2004-10-29 10:32:20', 'im going to put in some thing in my toolz.tcl script but dont know what to put in there to get it right', 0, 'tcl', 'something about tcl scripting in toolz.tcl', '#TCL');
INSERT INTO `pastebin` VALUES (2296, 'isn', '2004-10-01 11:34:19', 'bind pub - !add Main\r\n\r\nproc pub:Main {nick uhost handle chan args} {\r\n\r\nset stre [lindex $stre 0]\r\nset fg [open /glftpd/ftp-data/misc/affils.txt a]\r\n\r\n        putserv "PRIVMSG #ace : $stre"\r\n        puts $fg $stre nonewline\r\n        puts $fg " " nonewline\r\n\r\nclose $fg\r\n\r\n}\r\n', 0, 'tcl', 'Tcl error [Main]: wrong # args: should be &quot;lindex list index&quot;', '#TCL');
INSERT INTO `pastebin` VALUES (2475, 'pocke', '2004-12-05 13:50:38', 'proc ab:act {nick uhost hand dest keyword text} {\r\nif {([string match -nocase "*is*away*" $text]) || ([string match -nocase "*is*back*" $text])} {\r\nputquick "mode #channel +b *!*@[lindex [split $uhost @] 1]"\r\nputquick "kick #channel $nick :Public Away/Back = KickBan" }\r\n}\r\nbind ctcp - "ACTION" ab:act', 0, 'none', 'no public away', 'none');
INSERT INTO `pastebin` VALUES (2306, 'neverclear', '2004-10-04 15:19:29', 'bind join - * join:master\r\nproc join:master { nick } {\r\nif {[string match -nocase "neverclear" $nick]}{\r\nputhelp "PRIVMSG $chan :Welcome Master"\r\n}\r\n}\r\nputlog "loaded master.tcl"\r\n', 0, 'tcl', 'onjoin', 'none');
INSERT INTO `pastebin` VALUES (2307, 'eghah', '2004-10-05 04:57:19', '# Updated by NoZparker on Outsiderz Feb 2004\r\n#############################################################################\r\n#                ______   _____   _____   __  __   __   _____               #\r\n#               |_    _| /     \\ /     \\ |  \\|  | |  | |  ___|              #\r\n#                 |  |   |  |  | |  |  | |      | |  | |  ___|              #\r\n#                 |__|   \\_____/ \\_____/ |__|\\__| |__| |_____|              #\r\n#                 .-=[PC/UCF/DNG/PGC/TRPS/TEST/TSF/MEX/C4N]=-.              #\r\n#############################################################################\r\n\r\n\r\n##### DESCRIPTION ###########################################################\r\n# This little script will auto +v ppl with the voice flag on the bot.       #\r\n# You must have an o flag on the Bot before it will respond to your command #\r\n# The scripts deals with Triggers over 9 Chars                              #\r\n# Either Type @add <nick> Or @del <nick> in the chan                        #\r\n# The script will then add the nick to the bots voice list and the chanserv #\r\n#                 |  |   |  |  | |  |  | |      | |  | |  ___|              #\r\n#                 |__|   \\_____/ \\_____/ |__|\\__| |__| |_____|              #\r\n#                 .-=[PC/UCF/DNG/PGC/TRPS/TEST/TSF/MEX/C4N]=-.              #\r\n#############################################################################\r\n\r\n\r\n##### DESCRIPTION ###########################################################\r\n# This little script will auto +v ppl with the voice flag on the bot.       #\r\n# You must have an o flag on the Bot before it will respond to your command #\r\n# The scripts deals with Triggers over 9 Chars                              #\r\n# Either Type @add <nick> Or @del <nick> in the chan                        #\r\n# The script will then add the nick to the bots voice list and the chanserv #\r\n# vop list                                                                  #\r\n# Needless to say the bot need op to perform                                #\r\n# The idea of this is for the bot to take over voicinf users as they join   #\r\n# When chanserv has left irc                                                #\r\n#############################################################################\r\n\r\n\r\n##### CONTACT INFO ##########################################################\r\n# If you any comments or bug reports, you can either contact me via         #\r\n# e-mail at t00nie@hotmail.com or on irc #test98 on EFnet.                  #\r\n#############################################################################\r\n\r\n\r\n#----------------------------------------------------------------------------\r\n\r\n################################# BINDINGZ ##################################\r\n#you can add to your popups these four lines to make life easy when\r\n#adding users\r\n#-\r\n#voice box\r\n#.add nick to auto voice:/msg $chan @add $$1\r\n#.del nick to auto voice:/msg $chan @del $$1\r\n#-\r\n\r\nbind pub o @add pub:addvoice\r\nbind pub o @del pub:delvoice\r\nbind join 1 *!*@*    pub:onjoin\r\n\r\n\r\n################################ SETTINGZ ###################################\r\n#set the channel you wish to inform of and adds or dels\r\n\r\nset informops "#WAREZ-FOR-LIFE"\r\n\r\n#############################################################################\r\n#         __  __   _____   ______   __   __   __   __  __   _____           #\r\n#        |  \\|  | /     \\ |_    _| |  |_|  | |  | |  \\|  | /  ___\\          #\r\n#        |      | |  |  |   |  |   |   _   | |  | |      | |  \\_ \\          #\r\n#        |__|\\__| \\_____/   |__|   |__| |__| |__| |__|\\__| \\_____/          #\r\n#           ______   _____      _____   ____    __   ______                 #\r\n#          |_    _| /     \\    |  ___| |    \\  |  | |_    _|                #\r\n#            |  |   |  |  |    |  ___| |  |  | |  |   |  |                  #\r\n#            |__|   \\_____/    |_____| |____/  |__|   |__|                  #\r\n#             _____   _____   __      _____   __    __                      #\r\n#            |  __ \\ |  ___| |  |    /     \\ |  |/\\|  |                     #\r\n#            |  __ < |  ___| |  |__  |  |  | |        |                     #\r\n#            |_____/ |_____| |_____| \\_____/  \\__/\\__/                      #\r\n#                                                                           #\r\n#############################################################################\r\n\r\n\r\n############################### PROCEDUREZ ##################################\r\nproc pub:onjoin {nick uhost hand chan} {\r\n  if {[matchattr $hand 1]} {putserv "MODE $chan +v $nick"}\r\n  return 1\r\n}\r\n', 0, 'tcl', 'autovoice', 'none');
INSERT INTO `pastebin` VALUES (2312, 'leprechau', '2004-10-05 15:51:13', 'set cryptkey "abc123"\r\n\r\nproc pubDecrypt {nick uhost hand chan text} {\r\n   set text [decrypt $::cryptkey [lindex [split $text] 1]]\r\n   switch -exact -- [lindex $text 0] {\r\n      !test {pubTest $nick $uhost $hand $chan $text}\r\n      !help {pubHelp $nick $uhost $hand $chan $text}\r\n      !rules {pubRules $nick $uhost $hand $chan $text}\r\n      default {return}\r\n   }\r\n}\r\n\r\n\r\nHope that makes sense...\r\njust list your binds as cases in the switch body\r\nthen put the proc that they were originally bound to inside that case body\r\nafter that, you can remove all the regular binds to those procs as they are not going to work\r\nsince the text in the channel is encrypted and will not match the binds', 0, 'tcl', 'Here you go...simple decrypting switch statement', '#EggTCL');
INSERT INTO `pastebin` VALUES (2313, 'leprechau', '2004-10-05 15:52:45', 'set cryptkey "abc123"\r\n\r\nproc pubDecrypt {nick uhost hand chan text} {\r\n   set text [decrypt $::cryptkey [lindex [split $text] 1]]\r\n   switch -exact -- [lindex $text 0] {\r\n      !test {pubTest $nick $uhost $hand $chan $text}\r\n      !help {pubHelp $nick $uhost $hand $chan $text}\r\n      !rules {pubRules $nick $uhost $hand $chan $text}\r\n      default {return}\r\n   }\r\n}\r\nbind pub - +OK pubDecrypt\r\n\r\nHope that makes sense...\r\njust list your binds as cases in the switch body\r\nthen put the proc that they were originally bound to inside that case body\r\nafter that, you can remove all the regular binds to those procs as they are not going to work\r\nsince the text in the channel is encrypted and will not match the binds', 2312, 'none', 'here, forgot the bind lasttime', 'none');
INSERT INTO `pastebin` VALUES (2317, 'Pixelz', '2004-10-15 20:31:51', 'bind raw - 302 raw_getuserhost\r\nproc raw_getuserhost {from keyword arg} {\r\n	regexp {^(.+?)\\*?=.(.+)$} [lindex $arg 1] - nick uhost\r\n	invite2 $nick $uhost\r\n	putserv "privmsg #tcltest2 : IN RAW_GETUSREHOST userhost: $fullhost"\r\n}\r\n\r\nproc invTimeout {nick} {\r\n	putserv "PRIVMSG ::invState($nick,chan) :Userhost lookup for $nick failed."\r\n	array unset ::invState $nick,*\r\n}\r\n\r\nproc pub:invite {nick uhost hand chan args} {\r\n	if {![auth:check $hand]} {\r\n		notice $nick "Authentication is required to use public commands. Please authenticate yourself"\r\n		return 0\r\n	}\r\n	if {[llength [split $args]] < 1} {\r\n		notice $nick "Usage: invite <nick> "\r\n		return 0\r\n	}\r\n	set args [lindex $args 0]\r\n	set who [join [lindex $args 0]]\r\n	set ::invState($who,chan) $chan\r\n	set ::invState($who,timer) [utimer 60 "invTimeout $who"]\r\n	putserv "USERHOST $who"\r\n	putserv "PRIVMSG $chan :Looking up userhost for $who"\r\n}\r\n\r\nproc invite2 {nick uhost} {\r\n	catch {killtimer $::invState($nick,timer)}\r\n	set chan $::invState($nick,chan)\r\n	array unset ::invState $nick,*\r\n	\r\n	set key [lindex [getchanmode $chan] 1]\r\n	putserv "PRIVMSG $chan : FROM INSIDE PUB:INVITE HOST IS : $userhost"\r\n	putserv "PRIVMSG $chan :\\[invite\\] invited $who to $chan"\r\n	adduser $nick "*!*${uhost}"\r\n	chattr $nick +f|+fv $chan\r\n	putserv "INVITE $nick $chan"\r\n	putserv "PRIVMSG $nick : You are invited to $chan temporarily the key to the channel is $key"\r\n	putserv "PRIVMSG $chan :\\[invite\\] $nick is allowed to stay in $chan temporarily."\r\n}', 2316, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2300, 'smokey', '2004-10-01 23:07:45', 'proc sendtoirc { chan list } {\r\n   global maxwords method grp\r\n   set offset1 0\r\n   set offset2 0\r\n   if {[llength $list] > $maxwords} {\r\n      while {$offset1 < [llength $list]} {\r\n         putserv "PRIVMSG $grp :[join [lrange $list $offset1 $offset2]]"\r\n         set offset1 [expr $offset1 + $maxwords + 1]\r\n         set offset2 [expr $offset2 + $maxwords]\r\n      }\r\n   } else {\r\n      putserv "PRIVMSG $grp :[join $list]"\r\n   }\r\n}', 0, 'none', 'this', 'none');
INSERT INTO `pastebin` VALUES (2301, 'sablar', '2004-10-03 19:37:54', 'proc start {} {\r\n	font create irssi -family "Courier New" -size 10\r\n	wm geometry . 800x500\r\n	wm title . "main"\r\n	frame .r -relief flat\r\n	pack .r -side top -fill y -anchor w\r\n	frame .r.n -bd 1 -relief sunken\r\n	frame .r.c -bd 1 -relief sunken\r\n	#pack .r.n -side left -anchor w -fill both\r\n	#pack .r.c -side left -anchor w -fill both\r\n	grid .r.n -column 0 -row 0\r\n	grid .r.c -column 1 -row 0\r\n	grid columnconfigure .r.n 0 -uniform 1 -weight 1\r\n	grid columnconfigure .r.c 1 -uniform 1 -weight 1\r\n	label .r.n.label -height 6 -text "WIN1" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	label .r.c.label -height 6 -text "WIN2" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	#pack .r.c.label -side bottom -fill y\r\n	#pack .r.n.label -side bottom -fill y\r\n	grid .r.n.label -column 0 -row 0\r\n	grid .r.c.label -column 1 -row 0\r\n	grid columnconfigure .r.n.label 0 -uniform 1 -weight 1\r\n	grid columnconfigure .r.c.label 1 -uniform 1 -weight 1\r\n\r\n	frame .status -bd 1 -relief sunken\r\n	pack .status -side top -fill x\r\n	label .status.label -height 6 -text "STATUS" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	pack .status.label -side top -fill x\r\n\r\n	frame .channel -bd 1 -relief sunken\r\n	pack .channel -side top -fill both -expand 1\r\n	label .channel.label -text "CHANNEL" -justify left -anchor sw -bg #000000 -fg #FFFFFF -font "irssi 8"\r\n	pack .channel.label -side top -fill both -expand 1\r\n\r\n\r\n}', 0, 'tcl', 'none', '#TCL');
INSERT INTO `pastebin` VALUES (2434, 'Anonymous', '2004-11-24 13:28:54', '[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: generating secret for digest authentication ...\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: done\r\n[Wed Nov 24 14:01:40 2004] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?\r\n[Wed Nov 24 14:01:40 2004] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations\r\n[Wed Nov 24 14:02:04 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico\r\n[Wed Nov 24 14:03:31 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico', 2432, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2353, 'steady', '2004-11-07 18:40:32', 'couldn''t load file \\"./Gdtclft2.2.so\\": ld.so.1: /usr/local/bin/tclsh8.3: fatal: libgd.so.2: open failed: No such file or directory\r\n    while executing\r\n\\"load ./Gdtclft2.2.so\\"\r\n    (file "./test.tcl" line 3)', 0, 'tcl', 'gd lib wont work in tcl', '#TCL');
INSERT INTO `pastebin` VALUES (2354, 'Anonymous', '2004-11-08 01:00:10', 'bind pubm - "!hot*" pubm:link\r\n\r\nproc pubm:link {nick uhost handle chan text} {\r\n  if {$text != ""} {\r\n    if {[catch {ln -s bleh} result] != 0} {\r\n      putserv "PRIVMSG $chan :\\002Error\\002: $result"\r\n      return 1\r\n    }\r\n    putserv "PRIVMSG $chan :Linked: $text"\r\n  }\r\n}', 0, 'tcl', 'none', 'none');
INSERT INTO `pastebin` VALUES (2355, 'steady', '2004-11-08 03:35:43', 'Here''s the deal: I''m trying to make a CGI proggy that generates images on the fly.  I''m making a chat thats kinda like walking around in a sort of area.  The characters will be fully colour customised.   I had a set of 7 colours, with a special colour for the skin.  The way I had it sorted was that I would have a file for each conceivable combination, but this would result in some 28,000 files.  This way would allow me to allow all possible colours.\r\n\r\nThe script is composed of two parts: a CGI wrapper and the actual script that generates the colours.  The wrapper is currently being used for debugging, but will support the output when i am assured that the program will work in CGI mode.  The wrapper sets LD_LIBRARY_PATH, as the libs I need are not in their proper places and I can''t put them there, as I am not root.\r\n\r\nHere is the code for the wrapper:\r\n---\r\n\r\n#!/bin/sh\r\n\r\necho "Content-type: text/plain"\r\necho ""\r\n\r\necho "Setting initial values"\r\n\r\nPATHIN=/export/student/home/amason09/usr/lib\r\n#PATHIN=`pwd`\r\n#PATHIN=\r\n\r\nLD_LIBRARY_PATH=$PATHIN:/lib:/usr/lib:/usr/local/lib:.\r\nexport LD_LIBRARY_PATH\r\n\r\necho "LD Lib path set to $LD_LIBRARY_PATH"\r\n\r\necho "Now loading the program"\r\n\r\n./test.tcl 2>&1\r\n\r\necho "Program run."\r\n\r\n---\r\n\r\nAnd this is the code for the actual script:\r\n--\r\n\r\n#!/usr/local/bin/tclsh8.3\r\n\r\nproc debug {msg} {\r\n  puts  $msg\r\n}\r\n\r\ndebug "loading module... ld lib path is $env(LD_LIBRARY_PATH)"\r\nload ./Gdtclft2.2.so\r\ndebug "module loaded..."\r\n\r\nputs "Content-type: image/png\\n"\r\n\r\n################################################################\r\n# Sample gdtcl program\r\n#\r\n# Create a 64 x 64 image\r\nset im [gd create 64 64]\r\n\r\n# Get black and white as colors.  Black is the background color because\r\n# it is allocated first from a new image.\r\n\r\nset black [gd color new $im 0 0 0]\r\nset white [gd color new $im 255 255 255]\r\n\r\n# Draw a line from upper left to lower right\r\ngd line $im $white 0 0 63 63\r\n\r\n# Open a file for writing (Tcl on Unix, at least, doesn''t support ''wb'' mode)\r\nset out [open test.png w]\r\n\r\n# Output the image to the disk file\r\ngd writePNG $im $out\r\n\r\n# Close the file\r\nclose $out\r\n\r\n# Destroy the image in memory\r\ngd destroy $im\r\n\r\n---\r\n\r\n(the output will come later)\r\n\r\nThe problem is, when I try to run it in the console, it works fine:\r\n---\r\nContent-type: text/plain\r\n\r\nSetting initial values\r\nLD Lib path set to /export/student/home/amason09/usr/lib:/lib:/usr/lib:/usr/local/lib:.\r\nNow loading the program\r\nloading module... ld lib path is /export/student/home/amason09/usr/lib:/lib:/usr/lib:/usr/local/lib:.\r\nmodule loaded...\r\nContent-type: image/png\r\n\r\nProgram run.\r\n---\r\n\r\nBut when I run it under CGI:\r\n---\r\nSetting initial values\r\nLD Lib path set to /export/student/home/amason09/usr/lib:/lib:/usr/lib:/usr/local/lib:.\r\nNow loading the program\r\nloading module... ld lib path is /export/student/home/amason09/usr/lib:/lib:/usr/lib:/usr/local/lib:.\r\ncouldn''t load file "./Gdtclft2.2.so": ld.so.1: /usr/local/bin/tclsh8.3: fatal: libgd.so.2: open failed: No such file or directory\r\n    while executing\r\n"load ./Gdtclft2.2.so"\r\n    (file "/dev/fd/4" line 8)\r\nProgram run.\r\n---\r\n\r\nAm I doing something wrong?  I can''t see where I could be going wrong...\r\n\r\nNote: The image_create.cgi file is set to suid.', 0, 'tcl', 'troubles with GD lib in CGI powered by TCL', '#TCL');
INSERT INTO `pastebin` VALUES (2356, 'Barvaz', '2004-11-08 11:15:44', 'First Script\r\n# Throw Script\r\n# Bind command\r\nbind pub - throw pub:say\r\n\r\n# Throw\r\nset throw {\r\n  "Windows ME Installation CD"\r\n  "Bill Gates''s Address"\r\n  "X-BOX"\r\n  "Playstation 1"\r\n  "Playstation 2"\r\n}\r\n\r\n# Proc\r\n	proc pub:say {nick uhost hand chan arg} {\r\n	global throw\r\n	putmsg $chan "\\001ACTION throws on ${arg} [lindex $throw [rand [llength $throw]]]"}\r\n\r\n	return 0\r\n}\r\n\r\nputlog "Loaded throw by Barvaz"\r\n\r\nThe Second script\r\n\r\n# Slap Script\r\n# Bind command\r\nbind pub - slap pub:say\r\n\r\n# Slappers\r\nset aslapr {\r\n  "around a bit with a large trout"\r\n  "with his bare hands"\r\n}\r\n\r\n# Proc\r\n	proc pub:say {nick uhost hand chan arg} {\r\n	global aslapr\r\n	putmsg $chan "\\001ACTION slaps ${arg} [lindex $aslapr [rand [llength $aslapr]]]"}\r\n\r\n	return 0\r\n}\r\n\r\nputlog "Loaded slaps by Barvaz"', 0, 'tcl', 'thow and slap scripts', '#EggTCL');
INSERT INTO `pastebin` VALUES (2357, 'BL4DE', '2004-11-08 11:42:33', 'First Script\r\n# Throw Script\r\n# Bind command\r\nbind pub - throw pub:say\r\n\r\n# Throw\r\nset throw {\r\n  "Windows ME Installation CD"\r\n  "Bill Gates''s Address"\r\n  "X-BOX"\r\n  "Playstation 1"\r\n  "Playstation 2"\r\n}\r\n\r\n# Proc\r\nproc pub:say {nick uhost hand chan arg} {\r\n	global throw\r\n	if {[onchan "$arg" $chan]} {\r\n		putmsg $chan "\\001ACTION throws on ${arg} [lindex $throw [rand [llength $throw]]]"}\r\n	} else {\r\n		putmsg $chan "$arg wasnt found on chan"\r\n	}\r\n	return 0\r\n}\r\n\r\nputlog "Loaded throw by Barvaz"\r\n\r\nThe Second script\r\n\r\n# Slap Script\r\n# Bind command\r\nbind pub - slap pub:say2\r\n\r\n# Slappers\r\nset aslapr {\r\n  "around a bit with a large trout"\r\n  "with his bare hands"\r\n}\r\n\r\n# Proc\r\nproc pub:say2 {nick uhost hand chan arg} {\r\n	global aslapr\r\n	if {[onchan "$arg" $chan]} {\r\n		putmsg $chan "\\001ACTION slaps ${arg} [lindex $aslapr [rand [llength $aslapr]]]"}\r\n	} else {\r\n		putmsg $chan "$arg wasnt found on chan"\r\n	}\r\n	return 0\r\n}\r\n\r\nputlog "Loaded slaps by Barvaz"', 2356, 'tcl', 'Should more or less be fixed', '#EggTCL');
INSERT INTO `pastebin` VALUES (2346, 'Juzzy', '2004-11-06 09:37:54', '#!/bin/sh\r\n#Backup of ...\r\n\r\nfiles=''/etc/rc.conf /etc/pureftpd.passwd /etc/rc.firewall /etc/named.conf /etc/namedb /usr/local/etc''      \r\ngroup=configs\r\nthishost=`hostname -s`\r\nbackuphost=backups.domain.com\r\nlogin=backuplogin\r\npass=backuppassword\r\ndatestamp=`date +%m-%d-%Y`\r\ncd /backup\r\n\r\n#begin\r\ntar -czf ${thishost}_${group}_${datestamp}.tgz ${files}\r\n/usr/local/bin/ncftpput -u ${login} -p ${pass} -V ${backuphost} / ${thishost}_${group}_${datestamp}.tgz\r\nmv ${thishost}_${group}_${datestamp}.tgz old\r\n', 0, 'sh', 'backup script', 'none');
INSERT INTO `pastebin` VALUES (2436, 'leprechau', '2004-11-24 16:46:36', '## map xml hex encoded entities ##\r\nproc mapEntities {xml} {\r\n	if {[regexp -all -- {\\&\\#([^\\#]*)\\;} $xml]} {\r\n		foreach {x y} [regexp -all -inline -- {\\&\\#([^\\#]*)\\;} $xml] {\r\n			set xml [string map "$x [format %c 0$y]" $xml]\r\n		}; return $xml\r\n	} else {return $xml}\r\n}\r\n', 0, 'tcl', 'map xml hex entities', '#EggTCL');
INSERT INTO `pastebin` VALUES (2433, 'Anonymous', '2004-11-24 13:28:54', '[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: generating secret for digest authentication ...\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: done\r\n[Wed Nov 24 14:01:40 2004] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?\r\n[Wed Nov 24 14:01:40 2004] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations\r\n[Wed Nov 24 14:02:04 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico\r\n[Wed Nov 24 14:03:31 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico', 2432, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2372, 't0mb0y', '2004-11-09 13:19:19', 'bind dcc -|- say *say:dcc\r\n\r\nproc *say:dcc {hand idx text} {\r\n    set what [lrange $text 1 end]\r\n    set chan [lindex $text 0]\r\n    puthelp "PRIVMSG $chan :$text"\r\n}\r\n', 2371, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2373, 'rudenstam', '2004-11-09 13:52:24', 'package require http\r\n\r\nbind pub -|- !eniro        rud:pub:eniro\r\n\r\nproc rud:pub:eniro {nick uhost hand chan arg} {\r\n  if {[string trim $arg] == "" } {\r\n    putquick "NOTICE $nick :\\00314\\[\\003ERROR\\00314\\]\\003 Enter a number to search for (swedish only)"\r\n    return\r\n  }\r\n  set token [http::geturl http://privatpersoner.eniro.se/query?stq=0&firstname=&lastname=&area=&phone_number=$arg&what=wphone&firstnameType=trunc&lastnameType=trunc&addressType=trunc -timeout 10000]\r\n  upvar #0 $token state\r\n  if {[::http::ncode $token] == "200"} {\r\n    set data [split $state(body) "\\n"]\r\n    if { [lindex [split [string range [string trim [lindex $data 95]] 15 end-7] " "] 4] == "ingen" } {\r\n        putserv "NOTICE $nick :No hits"\r\n    } elseif { [string match "*Mobilnr*" [lindex $data 132]] } {\r\n            set name [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 131]]]\r\n            set phone [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 132]]]\r\n            set adress [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 135]]]\r\n\r\n            putserv "NOTICE $nick :$name"\r\n            putserv "NOTICE $nick :$adress"\r\n            putserv "NOTICE $nick :$phone"\r\n    } elseif { [string match "*Gula Sidorna*" [lindex $data 51]] } {\r\n            http::cleanup $token\r\n            set url [string range [lindex $data 51] [expr [string first \\" [lindex $data 51]]+1] [expr [string first \\" [lindex $data 51] [expr [string first \\" [lindex $data 51]]+1]]-1]]\r\n            set token [http::geturl $url -timeout 10000]\r\n            upvar #0 $token state\r\n            set data [split $state(body) "\\n"]\r\n\r\n            set name [string range [lindex $data 377] [expr [string first > [lindex $data 377]]+1] [expr [string first < [lindex $data 377]]-1]]\r\n            set phone [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 382]]]\r\n            set adress [string trim [lindex $data 383]]\r\n\r\n            putserv "NOTICE $nick :$name"\r\n            putserv "NOTICE $nick :$adress"\r\n            putserv "NOTICE $nick :$phone"\r\n\r\n    } else {\r\n            set name [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 132]]]\r\n            set phone [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 133]]]\r\n            set adress [string trim [string map { <b> "" </b> "" <br> "" } [lindex $data 134]]]\r\n\r\n            putserv "NOTICE $nick :$name"\r\n            putserv "NOTICE $nick :$adress"\r\n            putserv "NOTICE $nick :$phone"\r\n    }\r\n  } else {\r\n        putserv "NOTICE $nick :Problem connecting to server"\r\n  }\r\n  http::cleanup $token\r\n}\r\n\r\nputlog "rud-eniro.tcl loaded"', 0, 'tcl', 'none', 'none');
INSERT INTO `pastebin` VALUES (2374, 'joe-', '2004-11-09 16:08:32', 'for {set y 1} {$y <= [array size $sortafter]} {incr y} { \r\n# the line under is my prob... i want $sortafter''s value put into the var, like i tried to explain down here ;)\r\n        if {$download == ${[set $sortafter]($y)}} {\r\n        set allup($y)       [format %.1f [expr $allup($y) / 1024.0 / 1024.0]]\r\n        set alldn($y)       [format %.1f [expr $alldn($y) / 1024.0 / 1024.0]]\r\n        set wkdn($y)        [format %.1f [expr $wkdn($y) / 1024.0 / 1024.0]]\r\n        set wkup($y)        [format %.1f [expr $wkup($y) / 1024.0 / 1024.0]]\r\n        set monthdn($y)     [format %.1f [expr $monthdn($y) / 1024.0 / 1024.0]]\r\n        set monthup($y)     [format %.1f [expr $monthup($y) / 1024.0 / 1024.0]]\r\n\r\n        set all_all_up          [expr $all_all_up + $allup($y)]\r\n        set all_all_dn          [expr $all_all_dn + $alldn($y)]\r\n        set all_wk_up           [expr $all_wk_up + $wkup($y)]\r\n        set all_wk_dn           [expr $all_wk_dn + $wkdn($y)]\r\n        set all_month_up        [expr $all_month_up + $monthup($y)]\r\n        set all_month_dn        [expr $all_month_dn + $monthdn($y)]\r\n\r\n        set username($y)        [makeline " " "$pre(in_nick)" "[string length "$username($y)@$group($y)"]" "left" "$username($y)@$group($y)"]\r\n        set allup($y)           [makeline " " "$pre(in_all)" "[string length "$allup($y)   "]" "right" "$allup($y)\\GB"]\r\n        set alldn($y)           [makeline " " "$pre(in_all)" "[string length "$alldn($y)   "]" "right" "$alldn($y)\\GB"]\r\n        set wkdn($y)            [makeline " " "$pre(in_week)" "[string length "$wkdn($y)   "]" "right" "$wkdn($y)\\GB"]\r\n        set wkup($y)            [makeline " " "$pre(in_week)" "[string length "$wkup($y)   "]" "right" "$wkup($y)\\GB"]\r\n        set monthdn($y)         [makeline " " "$pre(in_month)" "[string length "$monthdn($y)   "]" "right" "$monthdn($y)\\GB"]\r\n        set monthup($y)         [makeline " " "$pre(in_month)" "[string length "$monthup($y)   "]" "right" "$monthup($y)\\GB"]\r\n\r\n        puts "$pre(left)$username($y)$pre(splitter)$alldn($y)$pre(splitter)$allup($y)$pre(splitter)$wkdn($y)$pre(splitter)$wkup($y)$pre(splitter)$monthdn($y)$\r\n}\r\n}\r\n', 0, 'tcl', 'tcl-dumb-code', '#EggTCL');
INSERT INTO `pastebin` VALUES (2387, 'flin', '2004-11-13 16:30:12', 'bind pub - !dupe dupeproc\r\nproc dupeproc {nick host handle chan text} {\r\n puthelp "privmsg $chan :Checking for dupes..." \r\n set dupefile [open dupelist r]\r\n set counter 1\r\n while {!EOF} {\r\n  gets $dupefile line($counter)\r\n  if {"$line($countr)" == "$text"} {\r\n   puthelp "privmsg $chan :$line($counter)"\r\n  }\r\n incr $counter\r\n }\r\nclose dupefile\r\nreturn 0\r\n}\r\n\r\n# if i try !dupe holidaypics theres no output,\r\n# the word holidaypics is in the duplist.', 0, 'tcl', 'dupe script. who can help me :)', '#EggTCL');
INSERT INTO `pastebin` VALUES (2403, 'Robb', '2004-11-17 22:58:28', 'if {![info exists LastNews]} {\r\nvariable LastNews {}\r\ntimer 1 nerikes_connect\r\n}\r\nproc nerikes_connect {} {\r\n	if {![catch { socket www.nerikes.se 80 } sock]} {\r\n		fconfigure $sock -blocking 0 -buffering line -buffersize 10000\r\n		fileevent $sock writable [list nerikes_write $sock]\r\n		fileevent $sock readable [list nerikes_read $sock] \r\n	}\r\n	timer 1 nerikes_connect\r\n}\r\n\r\nproc nerikes_write {sock} {\r\n	fileevent $sock writable {}\r\n	puts $sock "GET /textversion/senastenytt_idag.asp HTTP/1.0"\r\n	puts $sock "Host: www.nerikes.se"\r\n	puts $sock "User-Agent: Mozilla??"\r\n	puts $sock ""\r\n	flush $sock\r\n}\r\n\r\n', 2402, 'none', 'lep check that..', '#TCL');
INSERT INTO `pastebin` VALUES (2406, 't0mb0y', '2004-11-19 17:48:39', 'utimer 10 "gen:announce_enabled"\r\n\r\nproc gen:announce_enabled {} {\r\n    global mainchan\r\n    putserv "PRIVMSG $mainchan :Key Generator is enabled! Be Careful!!"\r\n}\r\n', 0, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2407, 'BL4DE', '2004-11-19 17:51:09', 'utimer 10 [list gen:announce_enabled]\r\n\r\nproc gen:announce_enabled {} {\r\n    global mainchan\r\n    putserv "PRIVMSG $mainchan :Key Generator is enabled! Be Careful!!"\r\n    utimer 10 [list gen:announce_enabled] # putting at the bottom will make it cycle, but be careful when u rehash\r\n}', 2406, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2416, 'leprechau', '2004-11-23 00:35:40', '## here you go...just some simple code from my tclsh prompt\r\n## this is just a copy and paste of exactly what i typed out and the command returns\r\n##\r\n\r\n% package require http\r\n2.4.5\r\n% proc unhtml {text} {regsub -all -- {(<.+?>)} $text {}}\r\n% set token [::http::geturl http://irpg.no-ip.info:81/players.php]\r\n::http::1\r\n% regexp -all -- {<ol>(.+?)</ol>} [::http::data $token] x players\r\n1\r\n% ::http::cleanup ::http::1\r\n% foreach line [lrange [split $players \\n] 0 5] {puts "[unhtml $line]"}\r\n\r\n    player23, the level 45 king. Next level in 4 days, 15:45:15.\r\n    Shadowsteel, the level 44 Dark Avenger. Next level in 0 days, 00:20:08.\r\n    ferret, the level 44 Queen Ferret of the World. Next level in 1 day, 14:51:38.\r\n    SoundLaye, the level 44 Producer. Next level in 2 days, 18:54:04.\r\n    kel_ravien, the level 44 idler. Next level in 3 days, 09:14:21.\r\n%', 2415, 'tcl', 'here you go..read through this', '#EggTCL');
INSERT INTO `pastebin` VALUES (2417, 'nila', '2004-11-23 07:05:07', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r\n\r\n<html>\r\n<head>\r\n<title>Add a Image and Products</title>\r\n<link rel="stylesheet" href="../main.css" type="text/css">\r\n<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">\r\n<script language="JavaScript">\r\n<!--\r\n// Show the extra colours\r\nfunction showCols()\r\n{	alert(''abcd'');\r\n}\r\n\r\nfunction fixPrice(whichOne)\r\n{	var a;\r\n	(whichOne == "1") ? a = document.form2.pPrice : a = document.form2.pPriceWS;\r\n	\r\n	if(a.value.length > 0)\r\n	{	// if the correct number of decimal places is missing then add the extra 0''s\r\n		if(a.value.indexOf(".") < 0)\r\n			a.value = a.value + ".00";\r\n		else if(a.value.indexOf(".") == a.value.length-2)\r\n			a.value = a.value + "0";\r\n	}\r\n}\r\nfunction chkProd(text, what)\r\n{	var myRegExp;\r\n	if(what == "prod")\r\n		myRegExp = /[^\\w\\s-/\\\\]/;\r\n	else\r\n		myRegExp = /[^\\d\\s\\.]/;\r\n	return !(myRegExp.test(text));\r\n}\r\nfunction chkForm()\r\n{	var errMsg = "";\r\n	var d = document.form2;\r\n\r\n	// check the Product code\r\n	var prodLen = d.pCode.value.length\r\n	if(prodLen < 4)\r\n		errMsg = " - The Product Code is too short\\n";\r\n	else if(chkProd(d.pCode.value, "prod") == false)\r\n	{		errMsg += " - The Product Code is invalid\\n";\r\n	}\r\n	\r\n	// and the Product Description\r\n	if(d.pDes.value.length < 5)\r\n		errMsg += " - The Product Description is too short\\n";\r\n		\r\n	// and the Product Price\r\n	if((d.pPrice.value.length < 1) || (chkProd(d.pPrice.value, ''blah'') == false))\r\n		errMsg += " - Invalid Price\\n";\r\n	\r\n	// If the error message is empty return true otherwise display it\r\n	if(errMsg.length < 1)\r\n		return true;\r\n	else\r\n	{	errMsg = "The form contains the following errors:   \\n" + errMsg;\r\n		alert(errMsg);\r\n		return false;\r\n	}\r\n}\r\n//-->\r\n</script>\r\n</head>\r\n<body bgcolor="#000000" text="#CCCCCC">\r\n<table border="0" cellspacing="0" cellpadding="0">\r\n  <tr> \r\n    <td height="2" width="25" rowspan="2">&nbsp;</td>\r\n    <td>&nbsp;</td>\r\n\r\n  </tr>\r\n  <tr> \r\n    <td> \r\n      <p class="pStrong">Step 2 : Add the products</p>\r\n      <table>\r\n        <tr> \r\n          <td colspan="2"> \r\n            <h3>Check the Images</h3>\r\n          </td>\r\n        </tr>\r\n\r\n        <tr> \r\n          <td align="center">Main Pic</td>\r\n          <td align="center">Thumbnail</td>\r\n        </tr>\r\n        <tr> \r\n          <td valign="top"><img src="../images/products/pics/175.jpg" width="200"></td>\r\n          <td valign="top"><img src="../images/products/thumbs/175.jpg"></td>\r\n        </tr>\r\n      </table>\r\n\r\n      <p>The code for this image is: 175</p>\r\n      &nbsp;&nbsp;&nbsp;- If the wrong image is showing <a href="/admin/prod-add.php?prodType=w">click \r\n        here</a></p>\r\n      <form name="form2" method="post" action="/admin/prod-add.php" onSubmit="return chkForm();">\r\n	  <input type="hidden" name="imgCode" value="175">\r\n	  <input type="hidden" name="whatStage" value="2">\r\n      <input type="hidden" name="prodType" value="w">\r\n        <table border="0" cellpadding="3" cellspacing="0">\r\n\r\n          <tr align="center" class="tblRownb"> \r\n            <td colspan="2"> \r\n              <b>Enter the Product Details</b>\r\n			</td>\r\n          </tr>\r\n          <tr class="tblRowd"> \r\n            <td align="right">Product Code</td>\r\n            <td> <input type="text" name="pCode" value="" class="inputTxt" size="12"> \r\n            </td>\r\n\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right">Description</td>\r\n            <td> <input type="text" name="pDes" value="" class="inputTxt" size="40"> \r\n            </td>\r\n          </tr>\r\n          <tr class="tblRowd"> \r\n            <td align="right" valign="top">Categories<br> <div class="pSmall">(Check \r\n                the clothes categories<br>\r\n\r\n                this item falls under)</div></td>\r\n            <td> \r\n                            <table cellspacing="2" cellpadding="3">\r\n                <tr> \r\n                  <td class="tblRowl">Womens</td>\r\n                                    <td class="tblRowl">General</td>\r\n                </tr>\r\n                <tr> \r\n                  <td class="tblRowd" valign="top">\r\n\r\n	<input type="checkbox" name="catID12" value="addCategory" >Catsuits<br>\r\n	<input type="checkbox" name="catID17" value="addCategory" >Coats/Capes<br>\r\n	<input type="checkbox" name="catID8" value="addCategory" >Corsets<br>\r\n	<input type="checkbox" name="catID37" value="addCategory" >Dresses (Alternative)<br>\r\n	<input type="checkbox" name="catID26" value="addCategory" >Dresses (Gothic)<br>\r\n	<input type="checkbox" name="catID10" value="addCategory" >Dresses (Sexy)<br>\r\n\r\n	<input type="checkbox" name="catID9" value="addCategory" >Fancy Dress<br>\r\n	<input type="checkbox" name="catID42" value="addCategory" >Fancy Dress Accessories<br>\r\n	<input type="checkbox" name="catID33" value="addCategory" >Fishnet<br>\r\n	<input type="checkbox" name="catID35" value="addCategory" >Gloves<br>\r\n	<input type="checkbox" name="catID22" value="addCategory" >Hotpants<br>\r\n	<input type="checkbox" name="catID13" value="addCategory" >Minis<br>\r\n\r\n	<input type="checkbox" name="catID38" value="addCategory" >Skirts (Alternative)<br>\r\n	<input type="checkbox" name="catID27" value="addCategory" >Skirts (Gothic)<br>\r\n	<input type="checkbox" name="catID14" value="addCategory" >Skirts (Sexy)<br>\r\n	<input type="checkbox" name="catID40" value="addCategory" >Tops (Alternative)<br>\r\n	<input type="checkbox" name="catID24" value="addCategory" >Tops (Gothic)<br>\r\n	<input type="checkbox" name="catID18" value="addCategory" >Tops (Sexy)<br>\r\n\r\n	<input type="checkbox" name="catID25" value="addCategory" >Trousers<br>\r\n</td>\r\n                                    <td class="tblRowd" valign="top">\r\n	<input type="checkbox" name="catID7" value="addCategory" >Accessories<br>\r\n	<input type="checkbox" name="catID36" value="addCategory" >Bags<br>\r\n	<input type="checkbox" name="catID41" value="addCategory" >Make Up<br>\r\n</td>\r\n                </tr>\r\n\r\n              </table>\r\n			</td>\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right">Price</td>\r\n            <td> &pound; <input type="text" name="pPrice" value="0.00" class="inputTxt" size="5" onBlur="javascript:fixPrice(1)"> \r\n            </td>\r\n          </tr>\r\n\r\n          <tr class="tblRowd"> \r\n            <td align="right">Wholesale Price</td>\r\n            <td> &pound; <input type="text" name="pPriceWS" value="0.00" class="inputTxt" size="5" onBlur="javascript:fixPrice(2)"> \r\n            </td>\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right" valign="top">Colours<br> <div class="pSmall">(Check \r\n                the colours<br>\r\n\r\n                this item comes in)</div></td>\r\n            <td> \r\n			<table>\r\n			  <tr>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID1" value="addColour">Black</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID4" value="addColour">Blue</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID9" value="addColour">Brocade</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID41" value="addColour">Burgandy</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID37" value="addColour">Gloss</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID38" value="addColour">Matt</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID42" value="addColour">Mint</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID35" value="addColour">Multi-coloured</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID16" value="addColour">Olive</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID18" value="addColour">Pink</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID5" value="addColour">Purple</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID2" value="addColour">Red</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID15" value="addColour">Rosa</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID6" value="addColour">Silver</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID3" value="addColour">White</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID10" value="addColour">Wine</td>\r\n</tr></table>\r\n		  <br>\r\n		  <a href="javascript:showCols()">Show More Colours</a>\r\n			<div style="display:none" id="xCols">\r\n			  <table>\r\n			    <tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID40" value="addColour">Back with Purple Front</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID26" value="addColour">Black & Green</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID25" value="addColour">Black & Pink</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID11" value="addColour">Black & Purple</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID8" value="addColour">Black & Red</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID7" value="addColour">Black & Silver</td>\r\n\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID12" value="addColour">Black & White</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID13" value="addColour">Black & Wine</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID39" value="addColour">Black and Leopard</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID23" value="addColour">Black with Blue Brocade</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID28" value="addColour">Black with Green Tartan</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID22" value="addColour">Black with Red Brocade</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID27" value="addColour">Black with Red Tartan</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID21" value="addColour">Black with Silver Brocade</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID30" value="addColour">Blue & Pink</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID19" value="addColour">Blue + White</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID36" value="addColour">Brown & Grey</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID32" value="addColour">Camo (Brown)</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID33" value="addColour">Camo (Green)</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID34" value="addColour">Camo (Grey)</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID29" value="addColour">Pink & Black</td>\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID17" value="addColour">Red + White</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID24" value="addColour">Red Tartan</td>\r\n\r\n		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID31" value="addColour">White & Green</td>\r\n</tr><tr>		<td valign="top"  class="tblRowl"><input type="checkbox" name="colourID20" value="addColour">White + Blue</td>\r\n<td></td></tr></table></div>            </td>\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right">&nbsp;</td>\r\n            <td><br> Add New Colour<br> <input type="text" name="newColour" class="inputTxt" size="15" maxlength="30"> \r\n              <input type="Button" name="AddColour" value="Add" class="inputBtn" onClick="javascript:form.submit()"> \r\n            </td>\r\n\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td>&nbsp;</td>\r\n            <td>&nbsp;</td>\r\n          </tr>\r\n          <tr class="tblRowd"> \r\n            <td align="right" valign="top">Sizes<br> <div class="pSmall">(Check \r\n                the sizes<br>\r\n                this item comes in) </div></td>\r\n\r\n            <td> \r\n              <table cellspacing="2" cellpadding="3">\r\n                <tr> \r\n                  <td class="tblRowl">General</td>\r\n                  <td class="tblRowl">Womens</td>\r\n                                  </tr>\r\n                <tr> \r\n                  <td class="tblRowd" valign="top">\r\n	<input type="checkbox" name="sizeID23" value="addSize" >Extra Small<br>\r\n\r\n	<input type="checkbox" name="sizeID1" value="addSize" >Small<br>\r\n	<input type="checkbox" name="sizeID2" value="addSize" >Medium<br>\r\n	<input type="checkbox" name="sizeID3" value="addSize" >Large<br>\r\n	<input type="checkbox" name="sizeID4" value="addSize" >Extra Large<br>\r\n	<input type="checkbox" name="sizeID20" value="addSize" >Extra Extra Large<br>\r\n	<input type="checkbox" name="sizeID19" value="addSize" >One Size<br>\r\n\r\n</td>\r\n                  <td class="tblRowd" valign="top">\r\n	<input type="checkbox" name="sizeID12" value="addSize" >08<br>\r\n	<input type="checkbox" name="sizeID13" value="addSize" >10<br>\r\n	<input type="checkbox" name="sizeID14" value="addSize" >12<br>\r\n	<input type="checkbox" name="sizeID15" value="addSize" >14<br>\r\n	<input type="checkbox" name="sizeID16" value="addSize" >16<br>\r\n\r\n	<input type="checkbox" name="sizeID17" value="addSize" >18<br>\r\n	<input type="checkbox" name="sizeID18" value="addSize" >20<br>\r\n	<input type="checkbox" name="sizeID22" value="addSize" >22<br>\r\n	<input type="checkbox" name="sizeID24" value="addSize" >24<br>\r\n	<input type="checkbox" name="sizeID25" value="addSize" >26<br>\r\n</td>\r\n                                  </tr>\r\n\r\n              </table>\r\n            </td>\r\n          </tr>\r\n          <tr class="tblRowd"> \r\n            <td align="right">&nbsp;</td>\r\n            <td>Add New Size<br> <input type="text" name="newSize" class="inputTxt" size="15" maxlength="30"> \r\n              <select name="sizeType">\r\n                <option value="w" selected>Womens</option>\r\n\r\n                <option value="m">Mens</option>\r\n                <option value="g">General</option>\r\n              </select> <input type="Button" name="AddSize" value="Add" class="inputBtn" onClick="javascript:form.submit()"> \r\n            </td>\r\n          </tr>\r\n          <tr class="tblRowd"> \r\n            <td>&nbsp;</td>\r\n            <td>&nbsp;</td>\r\n\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right" valign="top">Note about Product</td>\r\n            <td> <textarea name="pNote" class="inputTxt" cols="40" rows="4"></textarea> \r\n            </td>\r\n          </tr>\r\n          <tr class="tblRowl"> \r\n            <td align="right">&nbsp;</td>\r\n            <td>&nbsp;</td>\r\n\r\n          </tr>\r\n          <tr align="center"> \r\n            <td colspan="2" class="tblRownb"> \r\n                            <input type="submit" name="SubmitForm" value="Add Product" class="inputBtn"> \r\n            </td>\r\n          </tr>\r\n          <tr> \r\n            <td align="right">&nbsp;</td>\r\n            <td>&nbsp;</td>\r\n          </tr>\r\n        </table>\r\n\r\n      </form>\r\n    </td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>', 0, 'html', 'none', 'none');
INSERT INTO `pastebin` VALUES (2384, 'WeirdP', '2004-11-12 12:40:32', '#########\r\n# Problem is when a split happens it does nothing\r\n# and when any person quits normally, it says\r\n# fake netsplit, can anybody help me\r\n# fix this?\r\n#\r\n# thanks alot - WeirdP\r\n\r\nbind sign - * netsplit:detect\r\nproc netsplit:detect { nick host hand chan reason } {\r\nif {[string match *.voltnet.org $reason]} {\r\nset strong [lindex $reason 0]\r\nset weak [lindex $reason 1]\r\nputserv "PRIVMSG $chan : \\002Netsplit Detected: $weak\\002 split from \\002$strong\\002"\r\n} else {\r\nputserv "PRIVMSG $chan : \\002Fake Netsplit Detected\\002"\r\n}\r\n}\r\nputlog "Netsplit Detector Loaded"', 0, 'tcl', 'Netsplit Detector, any help would be great.', '#EggTCL');
INSERT INTO `pastebin` VALUES (2385, 'Robb', '2004-11-13 07:57:12', 'set i 1\r\n\r\nwhile {![eof $sock]} { \r\ngets $sock line\r\nif {[regexp -all {<td style="background-color: #.*?">(.*?)</td>} $line]} {\r\nregsub -all {(<.+?>)} $line "" line\r\nset stnick($i) $line\r\nincr i\r\n	}\r\n}\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2386, 'mroud', '2004-11-13 15:43:41', '                set output [exec $::binary_file $line ]\r\n\r\n                set channelss [open $tempfile w]\r\n                puts $channelss "$output"\r\n                close $channelss\r\n\r\n                set channelq [open $tempfile r+]\r\n                gets $channelq linefirst\r\n                gets $channelq linesecond\r\n                close $channelq\r\n                putserv "PRIVMSG $outchan :$linefirst"\r\n                putserv "PRIVMSG $outchan :$linesecond"', 0, 'tcl', 'for BL4DE', '#EggTCL');
INSERT INTO `pastebin` VALUES (2388, '[M4rk0]', '2004-11-13 17:29:45', 'bind pubm - "!countdown*" countdown\r\n\r\nproc countdown {nick host hand chan text} {\r\n$duration($calc($ctime(january 1 2005 00:00) - $ctime))\r\nputserv "PRIVMSG $chan :There is only $result left until year 2005!!"\r\n}\r\n', 0, 'tcl', 'Countdown snippet', '#EggTCL');

INSERT INTO `pastebin` VALUES (2390, 'urban', '2004-11-15 08:10:35', 'global finder_running\r\n\r\nif {![info exists finder_running]} {\r\n  set finder_running [utimer 150 finder]\r\n  set finder_running 1\r\n}\r\n\r\nproc finder {} {\r\n  puthelp "PRIVMSG #xxxpasswords :\\0034Use \\002!find\\002 | When using !find there is no keyword search anymore you have to enter full members url or part of it :)\\0034" ;utimer 150 finder\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\nproc startfree { nick host hand text chan } {\r\n\r\n  global finder_running\r\n\r\n  if {![info exists finder_running]} {\r\n    set finder_running [utimer 150 finder] }\r\n\r\n    putserv "privmsg #xxxpasswords :Freebie started"\r\n\r\n\r\n  }\r\n\r\n\r\n  proc stopfree { nick host hand text chan } {\r\n\r\n    global finder_running\r\n\r\n    killutimer $finder_running\r\n    #unset finder_running\r\n\r\n    putserv "privmsg #xxxpasswords :Freebie stopped"\r\n  }\r\n', 0, 'tcl', 'none', '#TCL');
INSERT INTO `pastebin` VALUES (2391, 'rEg', '2004-11-15 16:37:19', 'proc addpre {nick host hand chan arg} {\r\nset linkbotstatus [islinked "linkbot"]\r\n 	set time [unixtime]\r\n 	set title [lindex [split $arg] 0]\r\n 	set rlssection [lindex [split $arg] 1]\r\n 	if { [testcrap $nick $host $hand $chan $title] } { return 0 } \r\n 	sql selectdb pre\r\n	if {[string tolower $chan] == "#chan1" || [string tolower $chan] == "#chan2" || [string tolower $chan] == "#chan3" || [string tolower $chan] == "#chan4"} {\r\n 	set data [join [sql "SELECT * FROM pre WHERE title=''$title'' ORDER BY pretime DESC LIMIT 0, 1"]]\r\n 	if {$data == ""} {\r\n	sql query "INSERT IGNORE INTO pre (cat, title, pretime) VALUES (''$rlssection'', ''$title'', ''$time'')"\r\n#	putquick "PRIVMSG #chan5 :\\00315!rls $title $rlssection\\003"\r\n#	putquick "PRIVMSG #chan6 :!addpre $title $rlssection\\"\r\n	if {$linkbotstatus == 1} {\r\n	putbot linkbot "botnet say #chan7 \\00310(\\002\\00312PRE\\00310\\002)\\037\\0039=\\00310\\037(\\0033\\002$rlssection\\002\\00310)\\0039\\037=\\037\\00310(\\00314\\002$title\\002\\00310)\\003"\r\n#	putbot linkbot "botnet say #chan7 \\0032\\[\\00310PRE\\00313|\\002\\0039$rlssection\\0032\\002\\]\\=\\[\\00315$title\\0032\\]\\003"\r\n	}\r\n  	}\r\n 	}\r\n}\r\n\r\n##DONT COPY##', 0, 'tcl', 'bl4de', '#EggTCL');
INSERT INTO `pastebin` VALUES (2392, 'Anonymous', '2004-11-15 16:55:56', 'proc addpre {nick host hand chan arg} {\r\nset linkbotstatus [islinked "linkbot"]\r\n 	set time [unixtime]\r\n 	set title [lindex [split $arg] 0]\r\n 	set rlssection [lindex [split $arg] 1]\r\n 	if { [testcrap $nick $host $hand $chan $title] } { return 0 } \r\n 	sql selectdb pre\r\n	if {[string tolower $chan] == "#chan1" || [string tolower $chan] == "#chan2" || [string tolower $chan] == "#chan3" || [string tolower $chan] == "#chan4"} {\r\n 	set data [join [sql "SELECT * FROM pre WHERE title=''$title'' ORDER BY pretime DESC LIMIT 0, 1"]]\r\n 	if {$data == ""} {\r\n	sql query "INSERT IGNORE INTO pre (cat, title, pretime) VALUES (''$rlssection'', ''$title'', ''$time'')"\r\n	if {$linkbotstatus == 1} {\r\n	putbot linkbot "botnet say #chan7 \\0032\\[\\00310PRE\\00313|\\002\\0039$rlssection\\0032\\002\\]\\=\\[\\00315$title\\0032\\]\\003"\r\n	}\r\n  	}\r\n 	}\r\n}\r\n\r\n##DONT COPY##', 2391, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2393, 'rEg', '2004-11-15 16:56:41', 'proc addpre {nick host hand chan arg} {\r\nset linkbotstatus [islinked "linkbot"]\r\n 	set time [unixtime]\r\n 	set title [lindex [split $arg] 0]\r\n 	set rlssection [lindex [split $arg] 1]\r\n 	if { [testcrap $nick $host $hand $chan $title] } { return 0 } \r\n 	sql selectdb pre\r\n	if {[string tolower $chan] == "#chan1" || [string tolower $chan] == "#chan2" || [string tolower $chan] == "#chan3" || [string tolower $chan] == "#chan4"} {\r\n 	set data [join [sql "SELECT * FROM pre WHERE title=''$title'' ORDER BY pretime DESC LIMIT 0, 1"]]\r\n 	if {$data == ""} {\r\n	sql query "INSERT IGNORE INTO pre (cat, title, pretime) VALUES (''$rlssection'', ''$title'', ''$time'')"\r\n	if {$linkbotstatus == 1} {\r\n\r\n	putbot linkbot "botnet say #chan7 \\0032\\[\\00310PRE\\00313|\\002\\0039$rlssection\\0032\\002\\]\\=\\[\\00315$title\\0032\\]\\003"\r\n	}\r\n  	}\r\n 	}\r\n}\r\n\r\n##DONT COPY##', 2391, 'tcl', 'testing', '#EggTCL');
INSERT INTO `pastebin` VALUES (2399, 'leprechau', '2004-11-17 22:03:19', '#!/usr/local/bin/tclsh8.4\r\n#^-- this should point to your tclsh binary\r\n\r\n## load my crypto.so module from http://tclcryptography.sourceforge.net\r\n## make sure crypto is in the current dir, or change this path...\r\nif {![string match *Crypto* [package names]]} {load ./crypto.so} \r\n\r\n## get and compare passwords for given user\r\nproc check {file user pass} {\r\n        foreach line [split [read [set fid [open $file r]]] \\n] {\r\n                switch -glob -- [lindex [split $line] 0] {\r\n                        --PASS {set p [lindex [split $line] end]}\r\n                        \\#* - \\:\\:* - \\&\\&* - \\$\\$* - \\-\\-* {continue}\r\n                        default {set u [string trim [lindex [split $line] 0]]}\r\n                }                      \r\n                if {[string equal -nocase $user $u] && [info exists p]} {\r\n                        close $fid; return [string equal [bencpass $pass] $p]\r\n                }\r\n        }\r\n        ## user not found or user with out password set...return 3 to keep it\r\n        ## all numeric returns\r\n        close $fid; return 3\r\n}\r\n\r\n## run above proc and post output\r\nputs [check [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]]', 2398, 'tcl', 'small update to maintain numeric returns', '#TCL');
INSERT INTO `pastebin` VALUES (2394, '[Si|0]', '2004-11-15 17:19:45', 'proc addpre {nick host hand chan text} {\r\nset linkbotstatus [islinked "linkbot"]\r\n 	set time [unixtime]\r\n 	set title [lindex $text 0]\r\n 	set rlssection $text 1]\r\n 	if { [testcrap $nick $host $hand $chan $title] } { return 0 } \r\n 	sql selectdb pre\r\n	if {[string tolower $chan] == "#chan1" || [string tolower $chan] == "#chan2" || [string tolower $chan] == "#chan3" || [string tolower $chan] == "#chan4"} {\r\n 	set data [join [sql "SELECT * FROM pre WHERE title=''$title'' ORDER BY pretime DESC LIMIT 0, 1"]]\r\n 	if {$data == ""} {\r\n	sql query "INSERT IGNORE INTO pre (cat, title, pretime) VALUES (''$rlssection'', ''$title'', ''$time'')"\r\n	if {$linkbotstatus == 1} {\r\n\r\n	putbot linkbot "botnet say #chan7 \\0032\\[\\00310PRE\\00313|\\002\\0039$rlssection\\0032\\002\\]\\=\\[\\00315$title\\0032\\]\\003"\r\n	}\r\n  	}\r\n 	}\r\n}\r\n\r\n##DONT COPY##', 2393, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2395, '[Si|0]', '2004-11-15 17:20:13', 'proc addpre {nick host hand chan text} {\r\nset linkbotstatus [islinked "linkbot"]\r\n 	set time [unixtime]\r\n 	set title [lindex $text 0]\r\n 	set rlssection $text 1]\r\n 	if { [testcrap $nick $host $hand $chan $title] } { return 0 } \r\n 	sql selectdb pre\r\n	if {[string tolower $chan] == "#chan1" || [string tolower $chan] == "#chan2" || [string tolower $chan] == "#chan3" || [string tolower $chan] == "#chan4"} {\r\n 	set data [join [sql "SELECT * FROM pre WHERE title=''$title'' ORDER BY pretime DESC LIMIT 0, 1"]]\r\n 	if {$data == ""} {\r\n	sql query "INSERT IGNORE INTO pre (cat, title, pretime) VALUES (''$rlssection'', ''$title'', ''$time'')"\r\n	if {$linkbotstatus == 1} {\r\n\r\n	putbot linkbot "botnet say #chan7 \\0032\\[\\00310PRE\\00313|\\002\\0039$rlssection\\0032\\002\\]\\=\\[\\00315$title\\0032\\]\\003"\r\n	}\r\n  	}\r\n 	}\r\n}\r\n\r\n##DONT COPY##', 2393, 'tcl', 'Try this...', '#EggTCL');
INSERT INTO `pastebin` VALUES (2396, 't0mb0y', '2004-11-17 14:19:15', '        if { [string match "* *" $what] } {\r\n            regsub -all " " $what "." what\r\n        }\r\n        set what [string toupper $what 0 0]\r\n        foreach req [split "$what" "."] {\r\n            set req [string toupper $req 0 0]\r\n            set what [join "$req" "."]\r\n        }\r\n        putserv "PRIVMSG $chan :$what"\r\n', 0, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2397, 'BL4DE', '2004-11-17 14:25:55', 'if { [string match "* *" $what] } {\r\n            regsub -all " " $what "." what\r\n        }\r\n        set what [string toupper $what 0 0]\r\n        foreach req [split "$what" "."] {\r\n            set req [string toupper $req 0 0]\r\n            lappend what2 $req\r\n        }\r\n        set what [join $what2 .]\r\n        putserv "PRIVMSG $chan :$what"', 2396, 'tcl', 'this should work', '#EggTCL');
INSERT INTO `pastebin` VALUES (2398, 'leprechau', '2004-11-17 21:55:58', '#!/usr/local/bin/tclsh8.4\r\n#^-- this should point to your tclsh binary\r\n\r\n## load my crypto.so module from http://tclcryptography.sourceforge.net\r\n## make sure crypto is in the current dir, or change this path...\r\nif {![string match *Crypto* [package names]]} {load ./crypto.so} \r\n\r\n## get and compare passwords for given user\r\nproc check {file user pass} {\r\n        foreach line [split [read [set fid [open $file r]]] \\n] {\r\n                switch -glob -- [lindex [split $line] 0] {\r\n                        --PASS {set p [lindex [split $line] end]}\r\n                        \\#* - \\:\\:* - \\&\\&* - \\$\\$* - \\-\\-* {continue}\r\n                        default {set u [string trim [lindex [split $line] 0]]}\r\n                }                      \r\n                if {[string equal -nocase $user $u] && [info exists p]} {\r\n                        close $fid; return [string equal [bencpass $pass] $p]\r\n                }\r\n        }\r\n        close $fid; return "NOT FOUND"\r\n}\r\n\r\n## run above proc and post output\r\nputs [check [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]]', 0, 'tcl', 'userfile.tcl', '#TCL');
INSERT INTO `pastebin` VALUES (2400, 'pele_smk', '2004-11-17 22:10:00', 'set passwd_index2 0\r\n\r\nwhile {$passwd_index2 <= 9} {\r\n incr passwd_index2\r\n}', 0, 'tcl', 'while', '#TCL');
INSERT INTO `pastebin` VALUES (2401, 'pele_smk', '2004-11-17 22:11:26', '\r\n	\r\n\r\nset passwd_index2 0\r\n\r\nwhile {$passwd_index2 <= 9} {\r\n incr passwd_index2\r\n}', 0, 'tcl', 'while', '#TCL.NO');
INSERT INTO `pastebin` VALUES (2402, 'Robb', '2004-11-17 22:24:06', 'if {![info exists LastNews]} {\r\nvariable LastNews {}\r\ntimer 1 nerikes_auto\r\n}\r\nif {![info exists kolla]} {\r\nset kolla 1\r\ntimer 1 nerikes_auto\r\n}\r\n\r\nproc nerikes_auto {} {\r\nset sock [socket -async www.nerikes.se 80]\r\nfconfigure $sock -buffering line\r\nputs $sock "GET /textversion/senastenytt_idag.asp HTTP/1.0"\r\nputs $sock "Host: www.nerikes.se"\r\nputs $sock "User-Agent: Mozilla??"\r\nputs $sock ""\r\n\r\nflush $sock\r\nset d 1\r\nset l 1\r\nset o 1\r\nset n 1\r\nwhile {![eof $sock]} {\r\ngets $sock line\r\nif {[regexp -all {<p class="brodtext">Ännu inga nyheter i dag...</p>} $line]} {\r\nset nonews 1\r\n}\r\nif {[regexp -all {<span class="datum">(.*?)</span>} $line]} {\r\nregsub -all {(<.+?>)} $line "" line\r\nregsub -all {\\t} $line "" line\r\nregsub -all {&nbsp;} $line " " line\r\nregsub -all "&aring;" $line "å" line\r\nregsub -all "&auml;" $line "ä" line\r\nregsub -all "&ouml;" $line "ö" line\r\nregsub -all "&Aring;" $line "Å" line\r\nregsub -all "&Auml;" $line "Ä" line\r\nregsub -all "&Ouml;" $line "Ö" line\r\nregsub -all "&quot;" $line {"} line\r\nregsub -all "&#039;" $line {''} line\r\nset datum($d) $line\r\nincr d\r\n}\r\nif {[regexp -all {<a href="(.*?)" title=".*" class="rubrik">(.*?)<b>} $line _ lenk]} {\r\nregsub -all "&aring;" $lenk "å" lenk\r\nregsub -all "&auml;" $lenk "ä" lenk\r\nregsub -all "&ouml;" $lenk "ö" lenk\r\nregsub -all "&Aring;" $lenk "Å" lenk\r\nregsub -all "&Auml;" $lenk "Ä" lenk\r\nregsub -all "&Ouml;" $lenk "Ö" lenk\r\nregsub -all "&quot;" $lenk {"} lenk\r\nregsub -all "&#039;" $lenk {''} lenk\r\nregsub -all {(<.+?>)} $lenk "" lenk\r\nregsub -all {\\t} $lenk "" lenk\r\nset link($l) "http://www.nerikes.se/$lenk"\r\nincr l\r\n}\r\nif {[regexp -all {<b>(.*?)</b></a>} $line _ nyh]} {\r\nregsub -all "&aring;" $nyh "å" nyh\r\nregsub -all "&auml;" $nyh "ä" nyh\r\nregsub -all "&ouml;" $nyh "ö" nyh\r\nregsub -all "&Aring;" $nyh "Å" nyh\r\nregsub -all "&Auml;" $nyh "Ä" nyh\r\nregsub -all "&Ouml;" $nyh "Ö" nyh\r\nregsub -all "&quot;" $nyh {"} nyh\r\nregsub -all "&#039;" $nyh {''} nyh\r\nregsub -all {(<.+?>)} $nyh "" nyh\r\nset nyhet($n) "$nyh"\r\nincr n\r\n}\r\nif {[regexp -all {<span class="ort">(.*?)</span>} $line]} {\r\nregsub -all {(<.+?>)} $line "" line\r\nregsub -all {\\t} $line "" line\r\nregsub -all "&aring;" $line "å" line\r\nregsub -all "&auml;" $line "ä" line\r\nregsub -all "&ouml;" $line "ö" line\r\nregsub -all "&Aring;" $line "Å" line\r\nregsub -all "&Auml;" $line "Ä" line\r\nregsub -all "&Ouml;" $line "Ö" line\r\nregsub -all "&quot;" $line {"} line\r\nregsub -all "&#039;" $line {''} line\r\nset ort($o) $line\r\nincr o\r\n}\r\n}\r\nclose $sock\r\n\r\n\r\nvariable LastNews\r\nif {![string equal $nyhet(1) $LastNews]} {\r\nset LastNews "$nyhet(1)"\r\nputhelp "PRIVMSG #hyperunknown :\\002Senaste Nytt\\002: ''$nyhet(1)'' (\\002$ort(1)\\002 - $datum(1)) - \\037$link(1)\\037"\r\nputhelp "PRIVMSG #prim4x :\\002Senaste Nytt\\002: ''$nyhet(1)'' (\\002$ort(1)\\002 - $datum(1)) - \\037$link(1)\\037"\r\n}\r\ntimer 1 nerikes_auto\r\nreturn 1\r\n}\r\n', 0, 'none', 'none', '#TCL');
INSERT INTO `pastebin` VALUES (2404, 'Z1zou', '2004-11-19 07:59:53', 'bind pub o|g .join join1:pub\r\nproc join1:pub {nick uhost hand chan text} {\r\n set newchan [lindex $text 0]\r\n if {![validchan $newchan]} {\r\n  channel add $newchan\r\n  save\r\n } else {\r\n  return 0\r\n }\r\n}', 0, 'tcl', 'channel adding', '#TCL');
INSERT INTO `pastebin` VALUES (2405, 'Barvaz', '2004-11-19 12:21:59', '### !ADDOP <nick> [hand] [f]\r\n\r\nproc pub_lol_addop {me b c chan arg} {\r\n	set arg [charfilter $arg]\r\n	global lol botnick\r\n	if {![check $c $me $b]} {\r\n		if {$lol(silent) == 1 || [checksilent $c]} {return 0}\r\n                puthelp "NOTICE $me :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \\002/msg $botnick id <password>\\002 or \\002/msg $botnick silent <password>\\002 to no more receive this warning."\r\n		return 0\r\n	}\r\n	if {[llength $arg] < 1} {\r\n		puthelp "NOTICE $me :\\002Usage:\\002 [string trim $lol(cmdchar)]addop <nick> \\[hand\\] \\[f\\]"\r\n		return 0\r\n	}\r\n	set nick [lindex $arg 0]\r\n	set alternate [lindex $arg 1]\r\n	set f [strlwr [lindex $arg 2]]\r\n	set bot [strlwr $botnick]\r\n	set hostmask "$nick![getchanhost $nick $chan]"\r\n	set hand [nick2hand $nick $chan]\r\n	if {![onchan $nick $chan]} {\r\n                puthelp "NOTICE $me :Sorry, but I don''t see $nick in $chan."\r\n		return 0\r\n	}\r\n	if {[strlwr $nick] == $bot} {\r\n                puthelp "NOTICE $me :Sorry, but I can''t addops myself."\r\n		return 0\r\n	}\r\n	if {[getting-users]} {\r\n                puthelp "NOTICE $me :Sorry, but I''m transferring the userfile, try later."\r\n		return 0\r\n	}\r\n	if {$f == "f"} {\r\n		if {![validuser $alternate]} {\r\n			adduser $alternate [maskhost $hostmask]\r\n			chattr $alternate +p|+o $chan\r\n			puthelp "NOTICE $me :New user: $alternate ([maskhost $hostmask])"\r\n                        puthelp "NOTICE $me :$nick added to the $chan oplist and party-line with the hand: $alternate."\r\n                        puthelp "NOTICE $nick :You have been added to the $chan oplist and party-line by $me with the hand: $alternate."\r\n			puthelp "NOTICE $nick :You must set a password type: \\002/msg $botnick PASS <your_password>\\002"\r\n			if {[botisop $chan] && ![isop $nick $chan]} {\r\n				pushmode $chan +o $nick\r\n			}\r\n			return 0\r\n		}\r\n		setuser $alternate HOSTS [maskhost $hostmask]\r\n		chattr $alternate -|+o $chan\r\n		puthelp "NOTICE $me :Added hostmask for $alternate: [maskhost $hostmask]"\r\n                puthelp "NOTICE $me :$nick added to the $chan oplist with the hand: $alternate."\r\n                puthelp "NOTICE $nick :You have been added to the $chan oplist by $me with the hand: $alternate."\r\n		if {[botisop $chan] && ![isop $nick $chan]} {\r\n			pushmode $chan +o $nick\r\n		}\r\n		return 0\r\n	}\r\n	if {![validuser $hand]} {\r\n		if {[validuser $nick] && $alternate == ""} {\r\n                        puthelp "NOTICE $me :The hand $nick already exists. \\002Usage:\\002 !addop <nick> <hand> \\[f\\]"\r\n			return 0\r\n		}\r\n		if {$alternate != ""} {\r\n			if {[validuser $alternate]} {\r\n                                puthelp "NOTICE $me :The hand $alternate already exists. Choose another. \\002Usage:\\002 !addop <nick> <hand> \\[f\\]"\r\n				return 0\r\n			}\r\n			adduser $alternate [maskhost $hostmask]\r\n			chattr $alternate +p|+o $chan\r\n			puthelp "NOTICE $me :New user: $alternate ([maskhost $hostmask])"\r\n                        puthelp "NOTICE $me :$nick added to the $chan oplist and party-line with the hand: $alternate."\r\n                        puthelp "NOTICE $nick :You have been added to the $chan oplist and party-line by $me with the hand: $alternate."\r\n			puthelp "NOTICE $nick :You must set a password type: \\002/msg $botnick pass <your_password>\\002"\r\n			if {[botisop $chan] && ![isop $nick $chan]} {\r\n				pushmode $chan +o $nick\r\n			}\r\n			return 0\r\n		}\r\n		adduser $nick [maskhost $hostmask]\r\n		chattr $nick +p|+o $chan\r\n		puthelp "NOTICE $me :New user: $nick ([maskhost $hostmask])"\r\n                puthelp "NOTICE $me :$nick added to the $chan oplist and party-line with the hand: $nick."\r\n                puthelp "NOTICE $nick :You have been added to the $chan oplist and party-line by $me with the hand: $nick."\r\n		puthelp "NOTICE $nick :You must set a password type: \\002/msg $botnick pass <your_password>\\002"\r\n		if {[botisop $chan] && ![isop $nick $chan]} {\r\n			pushmode $chan +o $nick\r\n		}\r\n		return 0\r\n	}\r\n	if {$alternate != ""} {\r\n		if {[validuser $alternate]} {\r\n                        puthelp "NOTICE $me :The hand $alternate already exists. \\002Usage:\\002 !addop <nick> <hand> \\[f\\]"\r\n			return 0\r\n		}\r\n		adduser $alternate [maskhost $hostmask]\r\n		chattr $alternate +p|+o $chan\r\n		puthelp "NOTICE $me :New user: $alternate ([maskhost $hostmask])"\r\n                puthelp "NOTICE $me :$nick added to the $chan oplist and party-line with the hand: $alternate."\r\n                puthelp "NOTICE $nick :You have been added to the $chan oplist and party-line by $me with the hand: $alternate."\r\n		puthelp "NOTICE $nick :You must set a password type: \\002/msg $botnick PASS <your_password>\\002"\r\n		if {[botisop $chan] && ![isop $nick $chan]} {\r\n			pushmode $chan +o $nick\r\n		}\r\n		return 0\r\n	}\r\n	if {[matchattr $hand -|+o $chan]} {\r\n                puthelp "NOTICE $me :$nick is already an op in $chan with this hand: $hand"\r\n	} {\r\n		chattr $hand -|+o $chan\r\n                puthelp "NOTICE $me :$nick added to the $chan oplist with this hand: $hand."\r\n                puthelp "NOTICE $nick :You have been added to the $chan oplist by $me."\r\n	}\r\n	if {[botisop $chan] && ![isop $nick $chan]} {\r\n		pushmode $chan +o $nick\r\n		return 0\r\n	}\r\n	return 0\r\n}', 0, 'tcl', 'ADDOP proc from lol toolz script', '#EggTCL');
INSERT INTO `pastebin` VALUES (2413, 'mid', '2004-11-22 15:44:09', 'set p1 ""\r\nset p2 ""\r\nset p1health ""\r\nset p2health ""\r\nset playturn ""\r\nset attacker ""\r\nset defender ""\r\nset attackrate ""\r\nset defenderhealth ""\r\n\r\nbind pub - !battle pub:battle\r\nproc pub:battle {nick host hand chan text} {\r\nset p1 "$nick"\r\nset p2 [lindex [split $text] 0]\r\n	if {![info exists p2]} {\r\n		putserv "PRIVMSG $chan You must select an opponent"\r\n	}\r\n	if {![onchan $p2 $chan]} {\r\n		putserv "PRIVMSG $chan Opponent must be in the channel"\r\n	}\r\n	if {[info exists $p2] && [onchan $p2 $chan]} {\r\n		putserv "PRIVMSG $chan $p1 has initiated a battle with $p2!!!"\r\n		putserv "PRIVMSG $chan Type: !attack <nick>"\r\n	}\r\n}', 0, 'none', 'Battlebot', 'none');
INSERT INTO `pastebin` VALUES (2408, 'BL4DE', '2004-11-20 13:35:37', 'proc startupproc {} {\r\n  putlog "starting"\r\n}\r\nstartupproc', 0, 'tcl', 'here', '#EggTCL');
INSERT INTO `pastebin` VALUES (2409, 'stodderen', '2004-11-20 13:38:09', '[20:25] bseen1.4.2c:  -- Bass''s SEEN loaded --\r\n[20:25]      Loading seen database...\r\n[20:25]      Done loading 6 seen records.\r\n[20:25] * Last context: tclhash.c/239 []\r\n[20:25] * Please REPORT this BUG!\r\n[20:25] * Check doc/BUG-REPORT on how to do so.\r\n[20:25] * Wrote DEBUG\r\n[20:25] * SEGMENT VIOLATION -- CRASHING!\r\nSegmentation fault\r\n', 0, 'none', 'Fault on starting', 'none');
INSERT INTO `pastebin` VALUES (2410, 'Snyper', '2004-11-22 02:40:43', '# first off sorry about the crappy code.. its all in the works if you know what i mean..\r\n# I havnt make a script that got a list from a web site yet.. mainly just single\r\n# lines at a time.. but im needing to get a list 5 lines that are almost the same..\r\n# If you dont already know this is for IRPG.. the most boring game online :p\r\n#\r\n# i have to ways i know to get the data i need but only one line lists at a time..\r\n# the first way under ''TEST 2'' gets the line from the bottom.. and the one under ''TEST 3'' works\r\n# great but only 1 line..\r\n# heres where im getting the php code from http://irpg.no-ip.info:81/players.php\r\n# but below i have the first 5 lines\r\n#\r\n# <li><a href="playerview.php?player=player23">player23</a>, the level 45 king. Next level in 4 days, 14:23:23.</li>\r\n# <li><a href="playerview.php?player=Shadowsteel">Shadowsteel</a>, the level 44 Dark Avenger. Next level in 0 days, 22:16:34.</li>\r\n# <li><a href="playerview.php?player=ferret">ferret</a>, the level 44 Queen Ferret of the World. Next level in 2 days, 10:31:25.</li>\r\n# <li><a href="playerview.php?player=SoundLaye">SoundLaye</a>, the level 43 Producer. Next level in 0 days, 00:01:47.</li>\r\n# <li><a href="playerview.php?player=kel_ravien">kel_ravien</a>, the level 43 idler. Next level in 0 days, 14:57:16.</li>\r\n# OFFLINE LINE...\r\n# <li class="offline"><a class="offline" href="playerview.php?player=David">David</a>, the level 39 Neutral. Next level in 1 day, 10:50:27.</li>\r\n\r\n##########################\r\n# IdleRPG Top5 by Snyper #\r\n##########################\r\nset mychan ""\r\nset top5CMD "!top5"\r\n##########################\r\n\r\nset top5url "http://irpg.no-ip.info:81/players.php"\r\n\r\n# ---------------------------------------------------------------------------- #\r\n# ---------------------------------------------------------------------------- #\r\nproc idlerpg_top5 {get_top5} {\r\n  global mychan\r\n  lappend chan "$mychan"\r\n  set buffer [egghttp:data $get_top5]\r\n  egghttp:cleanup $get_top5\r\n\r\nset the_top5 "4READ ERROR :("\r\nset the_top52 "4READ ERROR :("\r\n\r\n#################\r\nputlog "TEST 2";##\r\n#################\r\n        foreach top_players [split $buffer "\\n"] {\r\n          if {[string match "*playerview.php?player=*" $top_players]} { regexp {<li>(.*)</li>} $top_players match the_top5 }\r\n          regsub -all {<([^<])*>} $the_top5 {} the_top5_out2\r\n        }\r\n#################\r\nputlog "TEST 3";##\r\n#################\r\n        if {[string match "*<li>*</li>*" $buffer]} {\r\n          set the_top52 [string range [string trim $buffer] [expr [string first "<li>" $buffer] + 4] [expr [string first "</li>" $buffer] - 1]]\r\n          regsub -all {<([^<])*>} $the_top52 {} the_top5_out\r\n        }\r\n#################\r\nputlog "TEST 4";##\r\n#################\r\n    putquick "PRIVMSG $chan :-- $the_top5_out"\r\n    putquick "PRIVMSG $chan :-- $the_top5_out2"\r\n#################\r\nputlog "END";#####\r\n#################\r\n}\r\n# ---------------------------------------------------------------------------- #\r\n# ---------------------------------------------------------------------------- #\r\nproc top5 {nick uhand hand chan input} {\r\n  global mychan irpg top5url\r\n  set mychan "$chan"\r\n#################\r\nputlog "START";###\r\n#################\r\n  set get_top5 [egghttp:geturl $top5url idlerpg_top5]\r\n#################\r\nputlog "TEST 1";##\r\n#################\r\n}\r\n\r\nbind pub - $top5CMD top5', 0, 'tcl', 'irpg top5', '#EggTCL');
INSERT INTO `pastebin` VALUES (2411, 'mid', '2004-11-22 15:13:47', 'bind pub - !battle pub:battle\r\nproc pub:battle {nick host hand chan text} {\r\nset p1 "$nick"\r\nif {![info exists p2]} {\r\nputserv "PRIVMSG $chan You must select an opponent"\r\nreturn\r\n	}\r\nset p2 [lindex [split $text] 0]\r\nputserv "PRIVMSG $chan $p1 has initiated a battle with $p2!!!"\r\nputserv "PRIVMSG $chan Type: !attack <nick>"\r\n}\r\n\r\nAnd in IRC:\r\n<mid> !battle\r\n<Frogger> You must select an opponent\r\n###GOOD###\r\n\r\n<mid> !battle DracZ\r\n<Frogger> You must select an opponent\r\n###Same thing happens :(', 0, 'none', 'Battlebot', '#EggTCL');
INSERT INTO `pastebin` VALUES (2412, 'FazLeeeN', '2004-11-22 15:37:04', '# List of available apt repositories available from ayo.freshrpms.net.\r\n# This file should contain an uncommented default suitable for your system.\r\n#\r\n# See http://ayo.freshrpms.net/ for a list of other repositories and mirrors.\r\n#\r\n# $Id: sources.list,v 1.8 2003/04/16 09:59:58 dude Exp $\r\n\r\n# Red Hat Linux 9\r\nrpm http://update.onlinehome-server.com redhat/9/en/i386 os updates\r\nrpm-src http://update.onlinehome-server.com redhat/9/en/i386 os updates\r\ndeb ftp://mirrors.kernel.org/debian/ stable main non-free contrib\r\ndeb-src ftp://mirrors.kernel.org/debian/ stable main non-free contrib\r\ndeb ftp://ftp.rutgers.edu/pub/debian/ stable main non-free contrib\r\ndeb-src ftp://ftp.rutgers.edu/pub/debian/ stable main non-free contrib\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2440, 'benzo', '2004-11-25 13:55:31', '#bind <type> - <command> <procedure>\r\n\r\n\r\n#bind pub <flags> <command> <proc>\r\n#procname <nick> <user@host> <handle> <channel> <text> \r\n\r\n\r\n\r\nbind pub - !n nickfunc\r\n \r\nproc nickfunc {nick uhost hand chan text} {\r\n 	if {![validuser $nick]} { return "" }\r\n 	set nicklwr [string tolower $nick]\r\n 	foreach user [userlist] {\r\n 		if {[string tolower $user] == $nicklwr} {\r\n 			return "$user"\r\n 		}\r\n 	}\r\n 	putserv "PRIVMSG $chan :$nick: hello"\r\n 	return ""\r\n}\r\n\r\n\r\n', 0, 'tcl', 'none', 'none');
INSERT INTO `pastebin` VALUES (2441, 'benzo', '2004-11-25 13:55:37', '#bind <type> - <command> <procedure>\r\n\r\n\r\n#bind pub <flags> <command> <proc>\r\n#procname <nick> <user@host> <handle> <channel> <text> \r\n\r\n\r\n\r\nbind pub - !n nickfunc\r\n \r\nproc nickfunc {nick uhost hand chan text} {\r\n 	if {![validuser $nick]} { return "" }\r\n 	set nicklwr [string tolower $nick]\r\n 	foreach user [userlist] {\r\n 		if {[string tolower $user] == $nicklwr} {\r\n 			return "$user"\r\n 		}\r\n 	}\r\n 	putserv "PRIVMSG $chan :$nick: hello"\r\n 	return ""\r\n}\r\n\r\n\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2442, 'benzo', '2004-11-25 14:01:23', 'writenicks {\r\n  write -c g:\\wwwroot\\nicklist.txt\r\n  var %i = 1\r\n  while %i <= $nick(#smfk,0,a) {\r\n    write g:\\wwwroot\\nicklist.txt $nick(#,%i,a)\r\n    inc %i\r\n  }\r\n}\r\n\r\n/smfk /timer1 0 10 /writenicks\r\n', 0, 'none', 'mirc', 'none');
INSERT INTO `pastebin` VALUES (2419, 'xDEV', '2004-11-24 02:46:04', '#  Tcl error [pub_@smoke]: wrong # args: should be "chanchecker chan"\r\n\r\n\r\nproc chanchecker {chan} {if{![string match "*+jokes*" [channel info $chan]]} {return 0}}\r\n\r\nproc pub_@smoke {nick uhost hand chan rest} {\r\n  global botnick\r\n  chanchecker\r\n  set cmd [string tolower [lindex $rest 0]]\r\n    if {$cmd == "help"} {\r\n        putnot $nick "Smoke a Bowl?"\r\n        putnot $nick "Share, smoke a bowl with <nick>"\r\n        return 0\r\n    }\r\n    if { $cmd == "imbotok" } {\r\n        set num [rand 4]\r\n	if {$num == "0"} {\r\n            putchan $chan "\\001ACTION \\002\\00315 im already fuckin high"\r\n            return 0\r\n        } elseif {$num == "1"} {\r\n            putchan $chan "\\001ACTION \\002\\00315 Fuck that i wanna shotgun !"\r\n            return 0\r\n        } elseif {$num == "2"} {\r\n            putchan $chan "\\001ACTION \\002\\00315 $nick, no more.. pleeeaase !"\r\n            return 0\r\n        } elseif {$num == "3"} {\r\n            putchan $chan "\\001ACTION \\002\\00315 Damn finally.."\r\n            return 0\r\n        }\r\n    } elseif {$cmd == ""} {\r\n        putchan $chan "\\001ACTION \\002\\00315 $nick sits down and sparks up a bowl"\r\n        return 0\r\n    }\r\n    putchan $chan "\\001ACTION \\00315$nick hands the pipe to $rest"\r\n}\r\nbind pub - !smoke pub_@smoke', 0, 'tcl', '[channel info $chan] help', '#EggTCL');
INSERT INTO `pastebin` VALUES (2418, 'bRAiNiAc2', '2004-11-23 16:23:53', 'proc nuke {nick uhost hand channel arg} {\r\nset linkbotstatus [islinked "linkbot"]\r\n      sql selectdb pre \r\n	putlog "-->Nuke command used by $nick at $channel"\r\n	set old [lindex [split $arg] 0]\r\n	set reason [lindex [split $arg] 1]\r\n	if {[string tolower $channel] == "#chan1" || [string tolower $channel] == "#chan2" || [string tolower $channel] == "#chan5" || [string tolower $channel] == "#chan3" || [string tolower $channel] == "#chan4"} {\r\n      sql query "UPDATE pre SET nukereason=(''$reason'') WHERE title=(''$old'')"\r\n      sql query "UPDATE pre SET nuketime=(''[unixtime]'') WHERE title=(''$old'')"\r\n	if {$linkbotstatus == 1} {\r\n	putbot linkbot "botnet say #channel \\00310\\(\\002\\0034N.U.K.E\\00310\\002)\\00312 » \\00310\\002$old\\002\\00312 » \\002\\0034Why:\\003\\002 »» \\00310\\002 $reason \\002\\003"\r\n	}\r\n	sql endquery\r\n	}\r\n}', 0, 'tcl', 'echoness', '#EggTCL');
INSERT INTO `pastebin` VALUES (2420, 'MPSnyper', '2004-11-24 05:16:19', 'proc chanchecker {chan} {if {![string match "*+idlestats*" [channel info $chan]]} {return}}\r\n\r\nproc top10 {nick uhand hand chan input} {\r\n  global irpg\r\nset chan "$chan"\r\n  set token [::http::geturl $irpg(url)/$irpg(players)]\r\n  set lines 5\r\nchanchecker "$chan"\r\n    #if {[lsearch -exact [channel info $chan] "+idlestats"] == -1} {return}\r\n    regexp -all -- {<ol>(.+?)</ol>} [::http::data $token] x players\r\n    ::http::cleanup $token\r\n    foreach line [lrange [split $players \\n] 6 10] {\r\n      set out [unhtml $line]\r\n      incr lines\r\n      nowbitch "PRIVMSG $chan :7$lines.  $out"\r\n    }\r\n}\r\n# Snyper', 0, 'tcl', 'OiNK', '#EggTCL');
INSERT INTO `pastebin` VALUES (2414, '1', '2004-11-22 18:03:30', 'bind pub o|g .join join1:pub\r\nproc join1:pub {nick uhost hand chan text} {\r\n set newchan [lindex $text 0]\r\n if {![validchan $newchan]} {\r\n  channel add $newchan\r\n  save\r\n } else {\r\n  return 0\r\n }\r\n}', 2404, 'none', '2', 'none');
INSERT INTO `pastebin` VALUES (2415, 'MPSnyper', '2004-11-23 00:14:39', '# PLayed with this for awhile last night with no luck.. any help ?\r\n\r\n# first off sorry about the crappy code.. its all in the works if you know what i mean..\r\n# I havnt make a script that got a list from a web site yet.. mainly just single\r\n# lines at a time.. but im needing to get a list 5 lines that are almost the same..\r\n# If you dont already know this is for IRPG.. the most boring game online :p\r\n#\r\n# i have to ways i know to get the data i need but only one line lists at a time..\r\n# the first way under ''TEST 2'' gets the line from the bottom.. and the one under ''TEST 3'' works\r\n# great but only 1 line..\r\n# heres where im getting the php code from http://irpg.no-ip.info:81/players.php\r\n# but below i have the first 5 lines\r\n#\r\n# <li><a href="playerview.php?player=player23">player23</a>, the level 45 king. Next level in 4 days, 14:23:23.</li>\r\n# <li><a href="playerview.php?player=Shadowsteel">Shadowsteel</a>, the level 44 Dark Avenger. Next level in 0 days, 22:16:34.</li>\r\n# <li><a href="playerview.php?player=ferret">ferret</a>, the level 44 Queen Ferret of the World. Next level in 2 days, 10:31:25.</li>\r\n# <li><a href="playerview.php?player=SoundLaye">SoundLaye</a>, the level 43 Producer. Next level in 0 days, 00:01:47.</li>\r\n# <li><a href="playerview.php?player=kel_ravien">kel_ravien</a>, the level 43 idler. Next level in 0 days, 14:57:16.</li>\r\n# OFFLINE LINE...\r\n# <li class="offline"><a class="offline" href="playerview.php?player=David">David</a>, the level 39 Neutral. Next level in 1 day, 10:50:27.</li>\r\n\r\n##########################\r\n# IdleRPG Top5 by Snyper #\r\n##########################\r\nset mychan ""\r\nset top5CMD "!top5"\r\n##########################\r\n\r\nset top5url "http://irpg.no-ip.info:81/players.php"\r\n\r\n# ---------------------------------------------------------------------------- #\r\n# ---------------------------------------------------------------------------- #\r\nproc idlerpg_top5 {get_top5} {\r\n  global mychan\r\n  lappend chan "$mychan"\r\n  set buffer [egghttp:data $get_top5]\r\n  egghttp:cleanup $get_top5\r\n\r\nset the_top5 "4READ ERROR :("\r\nset the_top52 "4READ ERROR :("\r\n\r\n#################\r\nputlog "TEST 2";##\r\n#################\r\n        foreach top_players [split $buffer "\\n"] {\r\n          if {[string match "*playerview.php?player=*" $top_players]} { regexp {<li>(.*)</li>} $top_players match the_top5 }\r\n          regsub -all {<([^<])*>} $the_top5 {} the_top5_out2\r\n        }\r\n#################\r\nputlog "TEST 3";##\r\n#################\r\n        if {[string match "*<li>*</li>*" $buffer]} {\r\n          set the_top52 [string range [string trim $buffer] [expr [string first "<li>" $buffer] + 4] [expr [string first "</li>" $buffer] - 1]]\r\n          regsub -all {<([^<])*>} $the_top52 {} the_top5_out\r\n        }\r\n#################\r\nputlog "TEST 4";##\r\n#################\r\n    putquick "PRIVMSG $chan :-- $the_top5_out"\r\n    putquick "PRIVMSG $chan :-- $the_top5_out2"\r\n#################\r\nputlog "END";#####\r\n#################\r\n}\r\n# ---------------------------------------------------------------------------- #\r\n# ---------------------------------------------------------------------------- #\r\nproc top5 {nick uhand hand chan input} {\r\n  global mychan irpg top5url\r\n  set mychan "$chan"\r\n#################\r\nputlog "START";###\r\n#################\r\n  set get_top5 [egghttp:geturl $top5url idlerpg_top5]\r\n#################\r\nputlog "TEST 1";##\r\n#################\r\n}\r\n\r\nbind pub - $top5CMD top5', 2410, 'tcl', 'IdleRPG Top5 help', '#EggTCL');
INSERT INTO `pastebin` VALUES (2421, 'GoMp', '2004-11-24 05:23:27', '#Read the comments downwards... \r\n\r\n#this procedure returns:\r\n#-1, if the chan is NOT set\r\n#0 and upwards, if the chan IS set\r\nproc chanchecker {chan} {lsearch -exact [channel info $chan] {+idlestats}}\r\n\r\nproc top10 {nick uhost hand chan arg} {\r\n   #global the var\r\n   global irpg\r\n   set tok [::http::geturl $irpg(url)/$irpg(players)]]\r\n   \r\n   #THIS IS WHERE YOU ARE WRONG, AS YOU HAVE TO EVALUATE THE RETURNED VALUE\r\n   if {[chanchecker $chan] != -1} {\r\n      #the returned value WAS NOT EQUAL TO 1, meaning the channel is set... now do your stuff\r\n      regexp -all -- {<ol>(.+?)</ol>} [::http::data $token] x players\r\n      ::http::cleanup $token\r\n      foreach line [lrange [split $players \\n] 6 10] {\r\n         set out [unhtml $line]\r\n         incr lines\r\n         nowbitch "PRIVMSG $chan :7$lines.  $out"\r\n       }\r\n   }\r\n}\r\n\r\n# Good luck...\r\n# -GoMp', 2420, 'tcl', 'illogic', '#EggTCL');
INSERT INTO `pastebin` VALUES (2422, 'leprechau', '2004-11-24 10:09:01', '## telnet session..trying to do a POST ... not much luck :/\r\n\r\n# telnet gungound.net 80\r\nTrying 64.94.29.14...\r\nConnected to pjn.qsrch.net.\r\nEscape character is ''^]''.\r\nPOST http://gunbound.net/rank_s.asp HTTP/1.0\r\nContent-Length: 21\r\nContent-Type: text/html\r\n\r\nSearch%5fId=leprechau\r\nHTTP/1.1 302 Found\r\nDate: Wed, 24 Nov 2004 16:06:22 GMT\r\nServer: Apache/1.3.27 (Unix) PHP/4.3.2\r\nX-Powered-By: PHP/4.3.2\r\nLocation: http://newnet.qsrch.com/dpark?s=&prt=nn02\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n\r\nConnection closed by foreign host.\r\n\r\n', 0, 'none', 'POST in telnet...', '#EggTCL');
INSERT INTO `pastebin` VALUES (2349, 'Juzzy', '2004-11-06 21:40:32', '#include <stdio.h>\r\n#include <string.h>\r\n\r\nint main() {\r\n\r\n	char d[50],x[50];\r\n	char *p;\r\n	char *domain="one.two.three.domain.com";\r\n\r\n\r\n	p = strstr(domain,".");\r\n	strncpy(x,p,49);\r\n	p++;\r\n\r\n	while ((p = strstr(p,".")) != NULL) {\r\n		strncpy(d,x,49);\r\n		p++;\r\n		strncpy(x,p,49);\r\n	}\r\n\r\n	printf("%s\\n",d);\r\n\r\n	return 0;\r\n}\r\n', 0, 'c', 'finding the domain', 'none');
INSERT INTO `pastebin` VALUES (2350, 'Juzzy', '2004-11-06 21:48:12', '#include <stdio.h>\r\n#include <string.h>\r\n\r\nint main() {\r\n\r\n	char d[50],x[50];\r\n	char *p;\r\n	char *domain="one.two.three.domain.com";\r\n\r\n	p = strstr(domain,".");\r\n	p++;\r\n	strncpy(x,p,49);\r\n	strncpy(d,domain,49);\r\n\r\n	while ((p = strstr(p,".")) != NULL) {\r\n		p++;\r\n		strncpy(d,x,49);\r\n		strncpy(x,p,49);\r\n	}\r\n\r\n	printf("%s\\n",d);\r\n\r\n	return 0;\r\n}', 2349, 'none', 'finding the domain - bug fix', 'none');
INSERT INTO `pastebin` VALUES (2358, 'Barvaz', '2004-11-08 12:15:53', 'Script:\r\n# Slap Section\r\n# Bind command\r\nbind pub - slap pub:say2\r\n\r\n# Slappers\r\nset aslapr {\r\n  "around a bit with a large trout"\r\n  "with his bare hands"\r\n}\r\n\r\n# Proc\r\n	proc pub:say2 {nick uhost hand chan arg} {\r\n	global aslapr\r\n	if {[onchan "$arg" $chan] || [string equal $arg $::botnick]} {\r\n	putmsg $chan "\\001ACTION slaps ${arg} [lindex $aslapr [rand [llength $aslapr]]]"}\r\n	} else {\r\n	putmsg $chan "$arg wasnt found on chan"\r\n	}\r\n\r\n\r\n	return 0\r\n}\r\n\r\nputlog "Loaded slaps by Barvaz"\r\n\r\n\r\nError:\r\n[20:12:57] <(F-B-I> [13:12] wrong # args: should be "proc name args body"\r\n[20:12:57] <(F-B-I>     while executing\r\n[20:12:57] <(F-B-I> "proc pub:say2 {nick uhost hand chan arg} {\r\n[20:12:57] <(F-B-I> 	global aslapr\r\n[20:12:57] <(F-B-I> 	if {[onchan "$arg" $chan] || [string equal $arg $::botnick]} {\r\n[20:12:57] <(F-B-I> 	putmsg $chan "\\001ACTION sl..."\r\n[20:12:57] <(F-B-I>     (file "scripts/slap.tcl" line 12)\r\n[20:12:57] <(F-B-I>     invoked from within\r\n[20:12:57] <(F-B-I> "source scripts/slap.tcl"', 0, 'tcl', 'ERROR in script', '#EggTCL');
INSERT INTO `pastebin` VALUES (2352, 'damir', '2004-11-07 12:56:34', '#include <stdio.h>\r\n#include <string.h>\r\n\r\nint str2array(char **pparv, char *string, char *delim);\r\n\r\nint str2array(char **pparv, char *string, char *delim) {\r\n    char *tok;\r\n    int pparc = 0;\r\n    tok = strtok(string, delim);\r\n    while (tok != NULL) {\r\n        pparv[pparc++] = tok;\r\n        tok = strtok(NULL, delim);\r\n    }\r\n    return pparc;\r\n}\r\n\r\nint main() {\r\n\r\n        char *dom = "111.222.333.444";\r\n        char **ar;\r\n        int p = 0;\r\n        printf("hmh");\r\n        p = str2array(ar,dom,".");\r\n        printf("first: %s second: %s",ar[1],ar[2]);\r\n        return(1);\r\n}\r\n', 0, 'none', 'seg fault', 'none');
INSERT INTO `pastebin` VALUES (2465, 'triune', '2004-12-01 18:43:37', 'proc chan:stats {nick uhost hand chan arg} {\r\n  regsub "#" $chan "" chans\r\n  putserv "PRIVMSG $chan :stats @ http://wtf.happened.to.my.eggdr0ps.net:23023/$chans"\r\n}', 0, 'none', 'public trigger attempt #2', 'none');
INSERT INTO `pastebin` VALUES (2466, 'triune', '2004-12-01 19:06:19', 'proc chan:stats {nick uhost hand chan arg} {\r\n  regsub "#" $chan "" chans\r\n  putserv "PRIVMSG $chan :stats @ http://wtf.happened.to.my.eggdr0ps.net:23023/$chans"\r\n}\r\n\r\nwhats wrong here?', 0, 'none', 'trigga problem', 'none');
INSERT INTO `pastebin` VALUES (2461, 'leprechau', '2004-11-29 16:51:00', '## here you go..short and simple msg invite proc and a channel setting variable\r\n\r\n\r\nset inviteChan "#somechan"\r\n\r\nproc msgInvite {nick uhost hand text} {\r\n   if {![matchattr $nick F|F $::inviteChan]} {return}\r\n   putserv "INVITE $nick $::inviteChan"\r\n}\r\nbind msg - !invite msgInvite\r\n\r\n', 0, 'none', 'simple invite', 'none');

INSERT INTO `pastebin` VALUES (2463, 't0mb0y', '2004-12-01 11:32:25', 'until [ -n "$name" ]; do\r\n    echo -n "Please enter the your name: "\r\n    read name\r\n    checkname=`echo "$name" | grep ^[[:alnum:]]*$`\r\n    if [ "$checkname" ]; then\r\n        echo "var from read is ok"\r\n    else\r\n        echo "var from read is NOT ok"\r\n        unset name\r\n    fi\r\ndone\r\n\r\n\r\n###  debug info below\r\n\r\n+ ''['' -n '''' '']''\r\n+ echo -n ''Please enter the your name: ''\r\n+ read name\r\n++ echo ASDF\r\n++ grep\r\nUsage: grep [OPTION]... PATTERN [FILE]...\r\nTry `grep --help'' for more information.\r\n+ checkname=\r\n+ ''['' '''' '']''\r\n+ echo ''var from read is NOT ok''\r\n+ unset name\r\n', 0, 'vrml', 'none', 'none');
INSERT INTO `pastebin` VALUES (2464, 'triune', '2004-12-01 17:45:35', 'namespace eval MyScript {\r\n  set response "stats @ http://wtf.happened.to.my.eggdr0ps.net:23023/dnbradio"\r\n  bind pub - "!stats" MyScript::respond\r\n  proc respond {nick uhost hand chan text} {\r\n    variable response\r\n    puthelp "PRIVMSG #dnbradio :$response"\r\n    return 1\r\n  }\r\n}\r\n\r\nwanna turn teh first url into http://wtf.happened.to.my.eggdr0ps.net:23023/name_of_channel_trigger_was_called"\r\nand\r\n"PRIVMSG #dnbradio :$response" into "PRIVMSG channel_it_was_triggered_in :$response"', 0, 'tcl', 'public trigger', '#EggTCL');
INSERT INTO `pastebin` VALUES (2332, 'DarKin', '2004-10-31 11:52:09', 'proc isnumber {string} {\r\n  if {(![regexp \\[^0-9\\] $string . \\[^0-9\\]]) || (![regexp \\[^0-9\\] $string])} then {\r\n    return 1\r\n  }\r\n  return 0\r\n}', 0, 'none', 'isnumber?', 'none');
INSERT INTO `pastebin` VALUES (2331, 'leprechau', '2004-10-31 11:26:15', '## i was getting sick of ops voicing everyone.. so to solve this made this..\r\n## but i can get it to work right.. and i know it has todo with "matchchanattr $victim v $chan"\r\n##\r\n## Thanks MP5nyper\r\n\r\n## Code Start ##\r\n\r\nproc uix(novoice) {nick uhost hand chan mode victim} {\r\n  ## just use regular matchattr..check for global or channel voice\r\n  ## format is: global flags|channel flags\r\n  ## and i don''t know why  you would use ! here\r\n  if {[matchattr $victim v|v $chan]} {\r\n    ## don''t use putquick here..and no space after first : unless you want it in your output\r\n    putserv "PRIVMSG $chan :$nick : $victim is a user.."\r\n    ## don''t return 0 ... simple return does the same... return 0 can cause errors in rare instances\r\n    return\r\n  } else {\r\n    ## no need for putquick here either\r\n    putserv "MODE $chan -v $victim"\r\n  }\r\n}\r\n## binds always after the proc\r\nbind mode - *+v* uix(novoice)\r\n\r\n## Code END ##', 2329, 'tcl', 'just a few changes', '#EggTCL');
INSERT INTO `pastebin` VALUES (2333, 'blubb', '2004-11-04 11:05:19', 'test, sry for it :)', 0, 'none', 'bla', 'none');
INSERT INTO `pastebin` VALUES (2334, 'Juz', '2004-11-04 23:18:47', '/* Program by: Jeremy\r\n * Date: 11/4/2004\r\n * Objective: Determine if a given number is prime.\r\n */\r\n\r\n#include <stdio.h>\r\n\r\nint isprime(unsigned int);\r\n\r\nint main() {\r\n	unsigned int number=1;\r\n	for(;;) {\r\n		printf("\\nInput a number to test if it is prime:");\r\n		scanf("%u",&number);\r\n		if (number == 0){\r\n			printf("Thanks.\\n");\r\n			return 0;\r\n		}\r\n\r\n		if (isprime(number))\r\n			printf("The number %u is prime.\\n",number);\r\n		else\r\n			printf("The number %u is NOT prime.\\n",number);\r\n	}\r\n	return 0;\r\n}\r\n\r\nint isprime(unsigned int num) {\r\n	int half,i;\r\n	if (num < 4)\r\n		return 1;\r\n	if (!(num % 2))\r\n		return 0;\r\n	\r\n	half = (num + 1) / 2;\r\n	for(i=3; i< half; i+=2) {\r\n		if(!(num % i))  \r\n			return 0;\r\n	}\r\n	return 1;\r\n}', 0, 'c', 'prime homework', 'none');
INSERT INTO `pastebin` VALUES (2432, 'FazLeeeN', '2004-11-24 13:27:57', '[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:38 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)\r\n[Wed Nov 24 14:01:39 2004] [warn] RSA server certificate CommonName (CN) `plesk'' does NOT match server name!?\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: generating secret for digest authentication ...\r\n[Wed Nov 24 14:01:39 2004] [notice] Digest: done\r\n[Wed Nov 24 14:01:40 2004] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?\r\n[Wed Nov 24 14:01:40 2004] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations\r\n[Wed Nov 24 14:02:04 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico\r\n[Wed Nov 24 14:03:31 2004] [error] [client 62.150.206.245] File does not exist: /home/httpd/vhosts/default/htdocs/favicon.ico', 0, 'none', 'apache error log', 'none');
INSERT INTO `pastebin` VALUES (2348, 'rezze', '2004-11-06 11:42:33', 'if {[llength $arg]==0} {\r\n                putserv "PRIVMSG $channel :Syntax !eniro telefonnummer"\r\n        } else {\r\n                set query "http://privatpersoner.eniro.se/query?firstname=&lastname=&area=&phone_number=${arg}&what=wphone&fi$\r\n                set page [::http::geturl $query]\r\n                upvar #0 $page pagearray\r\n                set lines [split [::http::data $page] \\n]\r\n                set numLines [llength $lines]\r\n                putserv "NOTICE $nick : Letar på eniro.se... var god vänta"\r\n                for {set i 0} {$i < $numLines} {incr i 1} {\r\n                        set line [lindex $lines $i]\r\n                        if {[string compare $line {<!-- start result -->}] == 0} {\r\n                                putserv  "NOTICE $nick : resultatet hittades, listar översta svaret: "\r\n                                        for {set k $i } {$k < $numLines} {incr k 1} {\r\n                                                #set temp [expr $i + $k]\r\n                                                set info [lindex $lines $k]\r\n                                                putserv  "NOTICE $nick $info"\r\n                                                if {[string compare $info {<!-- end result -->}] == 0} { return }\r\n                                        }\r\n                        }\r\n                        #elseif {[string compare $line {<!-- start result -->}] != 0} {\r\n                        #       putserv "NOTICE $nick : Tyvär, $arg fanns inte med katalogen"\r\n                        #}\r\n                }\r\n        }\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2351, 'damir', '2004-11-06 22:10:44', 'int Maskchecksum (char *data, int len)\r\n{\r\n        int                     i;\r\n        int                     j;\r\n\r\n        j=0;\r\n        for (i=0 ; i<len ; i++)\r\n        {\r\n          j += *data++ * (i < 16 ? (i+1)*(i+1) : i*(i-15));\r\n\r\n        }\r\n\r\n        return (j+1000)%0xffff;\r\n}\r\n\r\nunsigned z(char *s)\r\n{\r\n    unsigned int i;\r\n        i = Maskchecksum (s, strlen(s));\r\n    return i;\r\n}', 0, 'c', 'stuff', 'none');
INSERT INTO `pastebin` VALUES (2347, 'Robb', '2004-11-06 09:49:26', 'bind pub - .info info:file\r\n\r\nproc info:file {nick uhost handle channel text} {\r\nset file "path/to/nfo/file.nfo"\r\nset fid [open $file r]\r\nset out [split [read $fid] \\n]\r\nclose $fid\r\n\r\nforeach u $out { puthelp "PRIVMSG $nick :$u" }\r\n}', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2328, 'Boink1e', '2004-10-29 11:10:39', 'Hello i am looking for a working google.tcl\r\nsomeone have it for me?', 0, 'tcl', 'working google', '#EggTCL');
INSERT INTO `pastebin` VALUES (2435, 'leprechau', '2004-11-24 16:35:31', '## fairly simple wraping proc...never breaks a word\r\n## usage:  foreach line [wrapit $text 20] {puts $line}\r\n## example:\r\n## % set text "According to Finnish security researcher Jouko Pynnonen, who discovered the problem, the risk is not limited ## to IE users but also affects Mozilla Firefox both on Windows and Linux systems. Opera users also at risk."\r\n## According to Finnish security researcher Jouko Pynnonen, who discovered the problem, the risk is not limited to IE users ## but also affects Mozilla Firefox both on Windows and Linux systems. Opera users also at risk.\r\n## % foreach line [wrapit $text 20] {puts $line}\r\n## According to Finnish\r\n## security researcher\r\n## Jouko Pynnonen, who\r\n## discovered the problem,\r\n## the risk is not limited\r\n## to IE users but also\r\n## affects Mozilla Firefox\r\n## both on Windows and\r\n## Linux systems. Opera\r\n## users also at risk.\r\n## %\r\n##\r\nproc wrapit {text length} {\r\n	if {[string length [set tmp $text]] > $length} {\r\n		set len 0\r\n		while {$len < [string length $tmp]} {\r\n			if {![string equal {} [set tmpline [string range $tmp $len \\\r\n			[string wordend $tmp [expr {$len + ($length - 2)}]]]]]} {\r\n				lappend outs [string trim $tmpline]\r\n			}\r\n			incr len [string length $tmpline]\r\n		}\r\n		if {[info exists outs]} {return $outs}\r\n	} else {return [list $text]}\r\n}', 0, 'tcl', 'text wrap proc....wrap to any length without breaking words', '#EggTCL');
INSERT INTO `pastebin` VALUES (2437, 'anhi', '2004-11-24 16:49:06', '# now who wrote this one...cant remember\r\n# you can get a more complete table @ tcllib1.7/htmlparse/htmlparse.tcl\r\n\r\n##Find and unescape HTML escape characters of the form &xxx;\r\nproc uneschtml {text} {\r\n   if {![regexp & $text]} { set text } else {\r\n      regsub -all {([][$\\\\])} $text {\\\\\\1} text\r\n      regsub -all {&#([0-9][0-9]?[0-9]?);?} $text {[format \\%c [scan \\1 \\%d tmp;set tmp]]} text\r\n      regsub -all {&([a-zA-Z]+);?} $text {[uneschtml_map \\1]} text\r\n      subst -novariables $text\r\n   }\r\n}\r\n## Convert an HTML escape sequence into character (used only by uneschtml):\r\nproc uneschtml_map {text {unknown ?}} { global eschtml_map\r\n   if {[info exists eschtml_map($text)]} { set eschtml_map($text) } else { set unknown }\r\n}\r\n## ISO Latin-1 escape characters/codes (used by uneschtml_map):\r\narray set eschtml_map {\r\n   lt <   gt >   amp &   quot \\"   copy \\xa9\r\n   reg \\xae   ob \\x7b   cb \\x7d   nbsp \\xa0\r\n   nbsp \\xa0 iexcl \\xa1 cent \\xa2 pound \\xa3 curren \\xa4\r\n   yen \\xa5 brvbar \\xa6 sect \\xa7 uml \\xa8 copy \\xa9\r\n   ordf \\xaa laquo \\xab not \\xac shy \\xad reg \\xae\r\n   hibar \\xaf deg \\xb0 plusmn \\xb1 sup2 \\xb2 sup3 \\xb3\r\n   acute \\xb4 micro \\xb5 para \\xb6 middot \\xb7 cedil \\xb8\r\n   sup1 \\xb9 ordm \\xba raquo \\xbb frac14 \\xbc frac12 \\xbd\r\n   frac34 \\xbe iquest \\xbf Agrave \\xc0 Aacute \\xc1 Acirc \\xc2\r\n   Atilde \\xc3 Auml \\xc4 Aring \\xc5 AElig \\xc6 Ccedil \\xc7\r\n   Egrave \\xc8 Eacute \\xc9 Ecirc \\xca Euml \\xcb Igrave \\xcc\r\n   Iacute \\xcd Icirc \\xce Iuml \\xcf ETH \\xd0 Ntilde \\xd1\r\n   Ograve \\xd2 Oacute \\xd3 Ocirc \\xd4 Otilde \\xd5 Ouml \\xd6\r\n   times \\xd7 Oslash \\xd8 Ugrave \\xd9 Uacute \\xda Ucirc \\xdb\r\n   Uuml \\xdc Yacute \\xdd THORN \\xde szlig \\xdf agrave \\xe0\r\n   aacute \\xe1 acirc \\xe2 atilde \\xe3 auml \\xe4 aring \\xe5\r\n   aelig \\xe6 ccedil \\xe7 egrave \\xe8 eacute \\xe9 ecirc \\xea\r\n   euml \\xeb igrave \\xec iacute \\xed icirc \\xee iuml \\xef\r\n   eth \\xf0 ntilde \\xf1 ograve \\xf2 oacute \\xf3 ocirc \\xf4\r\n   otilde \\xf5 ouml \\xf6 divide \\xf7 oslash \\xf8 ugrave \\xf9\r\n   uacute \\xfa ucirc \\xfb uuml \\xfc yacute \\xfd thorn \\xfe\r\n   yuml \\xff\r\n}\r\n\r\n', 0, 'tcl', 'some old code', '#EggTCL');
INSERT INTO `pastebin` VALUES (2438, 'Z1zou', '2004-11-25 13:47:22', 'bind pub - yourproc\r\nproc yourproc {nick uhost hand chan text} {\r\n set who [lindex $text 0]\r\n set msg [lrange $text 1 end]\r\n puthelp "PRIVMSG $who :$msg"\r\n}', 0, 'tcl', 'example (msg to someone)', '#EggTCL');
INSERT INTO `pastebin` VALUES (2439, 'Anonymous', '2004-11-25 13:47:48', 'bind pub - !trigger yourproc\r\nproc yourproc {nick uhost hand chan text} {\r\n set who [lindex $text 0]\r\n set msg [lrange $text 1 end]\r\n puthelp "PRIVMSG $who :$msg"\r\n}', 2438, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2443, 'Z1zou', '2004-11-25 14:06:49', 'set rchannel "#restricted"\r\nset message {\r\nfirst line\r\nsecond line\r\nthird line\r\n}\r\n\r\nbind pub - !trigger bnc:pub\r\nproc bnc:proc {nick uhost hand chan text} {\r\n if {[lsearch -exact [string tolower $::rchannel] [string tolower $chan]] != -1} {\r\n  foreach lines [split $::message \\n] {\r\n   puthelp "PRIVMSG $chan :$lines"\r\n  }\r\n }\r\n}', 0, 'tcl', 'Channel messages on trigger (example)', '#EggTCL');
INSERT INTO `pastebin` VALUES (2444, 'Z1zou', '2004-11-25 14:12:35', 'set rchannel "#restricted"\r\nset message {\r\nfirst line\r\nsecond line\r\nthird line\r\n}\r\n\r\nbind pub - !trigger bnc:pub\r\nproc bnc:proc {nick uhost hand chan text} {\r\n if {[lsearch -exact [string tolower $::rchannel] [string tolower $chan]] != -1} {\r\n  foreach lines [split $::message \\n] {\r\n   puthelp "PRIVMSG $nick :$lines"\r\n  }\r\n }\r\n}', 2443, 'none', 'Get this on private', 'none');
INSERT INTO `pastebin` VALUES (2445, 'mutante', '2004-11-25 14:14:12', '# This is ugly code, but war is ugly, too.     \r\n          \r\nbind pub - !iraq casual\r\n\r\nproc casual {nick host hand chan args} {\r\nset reply [exec bash -c "lynx -dump http://icasualties.org/oif/ | grep \\"Total Fatalities\\""];\r\nputlog "$reply";\r\nputserv "PRIVMSG $chan :$reply";\r\n}\r\n \r\n# maybe somebody feels like doing it the proper way (e.g. egghttp)\r\n# one should add that these are only US fatalities. Nobody knows the casualties on the other side.    \r\n# Peace, mutante', 2443, 'tcl', 'ugly war', '#EggTCL');
INSERT INTO `pastebin` VALUES (2369, 'AL-3AsHiG', '2004-11-09 11:20:45', 'proc test_telnet {} {\r\n  if {[catch {set tnsock [socket -async eggdrop/ip eggdrop/port]} sockerr]} {\r\n    puts "Try again later, look out the window till then!"\r\n    close $tnsock\r\n    return 0\r\n  }\r\n  puts $tnsock "handle\\npass"\r\n  flush $tnsock\r\n  set tnout [gets $tnsock]\r\n  puts $tnout\r\n}', 0, 'tcl', 'socket/telnet', '#TCL');
INSERT INTO `pastebin` VALUES (2370, 'Atoms', '2004-11-09 11:59:46', 'Script:\r\n# Slap Section\r\n# Bind command\r\nbind pub - slap pub:say2\r\n\r\n# Slappers\r\nset aslapr {\r\n  "around a bit with a large trout"\r\n  "with his bare hands"\r\n}\r\n\r\n# Proc\r\n	proc pub:say2 {nick uhost hand chan arg} {\r\n	global aslapr\r\n	if {[onchan "$arg" $chan] || [string equal $arg $::botnick]} {\r\n	putmsg $chan "\\001ACTION slaps ${arg} [lindex $aslapr [rand [llength $aslapr]]]"}\r\n	} else {\r\n	putmsg $chan "$arg wasnt found on chan"\r\n	}\r\n\r\n\r\n	return 0\r\n}\r\n\r\nputlog "Loaded slaps by Barvaz"\r\n\r\n\r\nError:\r\n[20:12:57] <(F-B-I> [13:12] wrong # args: should be "proc name args body"\r\n[20:12:57] <(F-B-I>     while executing\r\n[20:12:57] <(F-B-I> "proc pub:say2 {nick uhost hand chan arg} {\r\n[20:12:57] <(F-B-I> 	global aslapr\r\n[20:12:57] <(F-B-I> 	if {[onchan "$arg" $chan] || [string equal $arg $::botnick]} {\r\n[20:12:57] <(F-B-I> 	putmsg $chan "\\001ACTION sl..."\r\n[20:12:57] <(F-B-I>     (file "scripts/slap.tcl" line 12)\r\n[20:12:57] <(F-B-I>     invoked from within\r\n[20:12:57] <(F-B-I> "source scripts/slap.tcl"\r\n\r\nOne thing:\r\nIn mirc/irssi/bx it`s normally when "\\001ACTION text" displays, \r\nbut in xchat you need to close too, like : \\001ACTION text\\001', 2358, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2371, 't0mb0y', '2004-11-09 13:01:20', 'bind dcc -|- say enc_say \r\n\r\nproc enc_say {nick uhost handle text} { \r\n    putserv "PRIVMSG $chan: $text" \r\n}\r\n', 0, 'tcl', 'dcc proc say', '#TCL.NO');
INSERT INTO `pastebin` VALUES (2365, 'Juzzy', '2004-11-08 21:24:00', 'alias addchan {\r\n  set %max_ $+ $chan $nick(#,0)\r\n  set %date_ $+ $chan $fulldate\r\n  echo -a 4 $+ # was successfully added w/ %max_ [ $+ [ $chan ] ] ppl in it!\r\n}\r\n\r\non 1:join:#:{\r\n  if ( $nick(#,0) > %max_ [ $+ [ $chan ] ] ) {\r\n    echo # RECORD BREAK! $chan  now has $nick(#,0)  peeps!\r\n    set %max_ $+ $chan $nick(#,0)\r\n    set %date_ $+ $chan $fulldate\r\n  }\r\n}', 0, 'none', 'max script', 'none');
INSERT INTO `pastebin` VALUES (2366, 'Juzzy', '2004-11-08 21:27:43', ';¤§¤;¤§¤;¤§¤;¤§¤;¤§¤;¤§¤;\r\n;¤§¤;   Author: Juzzy   ;¤§¤;\r\n;¤§¤;¤§¤;¤§¤;¤§¤;¤§¤;¤§¤;\r\n;\r\n; To load type:     /load -rs mp3.mrc\r\n;\r\n;version 1.5\r\n;\r\n\r\nmenu channel,status,menubar { \r\n  &Play an MP3:/mp3 | timer50 off\r\n  &Continuous play:/cplay\r\n  &Skip:/skip\r\n  St&op:/run %player /stop | .timer50 off\r\n  ;St&op:/splay stop | .timer50 off\r\n  &Generate a playlist:/makelist\r\n  &Create a webpage:writemp3\r\n}\r\nalias writemp3 {\r\n  set %ii 1\r\n  set %ttime 0\r\n  write -c mp3.html <html><head><title>Mp3 List</title></head><body bgcolor=#DFD275><table BORDER COLS=4 WIDTH="100%" ><tr><td> Song Name <td width="5%"> Bitrate <td width="8%"> Frequency <td width="15%"> Time </tr>\r\n  write -a mp3.html <center>This page was created by Juzzy''s Mp3 Generation script!<br></center>\r\n  :loop\r\n  if (%ii > $lines($shortfn(%mp3list))) { echo 4 -a Done! | goto end }\r\n  set %song $read -l $+ %ii %mp3list\r\n  set %info $mp3details2(%song)\r\n  write -a mp3.html <tr><td> $nopath(%song) <td> $gettok(%info,1,32) <td> $gettok(%info,2,32) <td> $duration($gettok(%info,3,32))</tr>\r\n  set %ttime $calc(%ttime + $gettok(%info,2,32))\r\n  inc %ii\r\n  goto loop\r\n  :end \r\n  write -a mp3.html </table><br>Total Time:<strong> $duration(%ttime) </strong>      ( $+ %ttime seconds) <br> Total mp3s: $lines($shortfn(%mp3list)) </body></html>\r\n}\r\nalias makelist {\r\n  set %mp3listroot $sdir="Please select the upper most parent mp3 directory"\r\n  :ask\r\n  set %ask $?!="Would you like to add an additional root dir?"\r\n  if (%ask) {\r\n    set %mp3listroot %mp3listroot $sdir="Please select the upper most parent mp3 directory"\r\n    goto ask  \r\n  }\r\n  write -c mp3list.bat @echo off\r\n  write -a mp3list.bat echo **** Please wait while the list is being generated ****\r\n  write -c list.txt\r\n  if ( [ $numtok( [ $+ [ %mp3listroot ] ] ,32) ] > 1) {\r\n    set %i 1\r\n    :loop\r\n    if (%i > $numtok(%mp3listroot,32)) { goto end }\r\n    write -a mp3list.bat dir /b/on/s $gettok( [ %mp3listroot ] ,%i,32) $+ *.mp3 >> list.txt\r\n    inc %i\r\n    goto loop\r\n  }\r\n  else { write -a mp3list.bat dir /b/s %mp3listroot $+ *.mp3 > $mircdirlist.txt }\r\n\r\n  :end\r\n  write -a mp3list.bat echo ** ALL DONE! **\r\n  /run mp3list.bat\r\n  set %mp3list list.txt\r\n}\r\nalias mp3details2 {\r\n  bread $shortfn(%song) 0 16 &var\r\n  set %mp3_bits $binary($gettok($bvar(&var,1-16),1,32)) $+ $binary($gettok($bvar(&var,1-16),2,32)) $+ $binary($gettok($bvar(&var,1-16),3,32)) $+ $binary($gettok($bvar(&var,1-16),4,32))\r\n  set %mp3_bits $binary($gettok($bvar(&var,1-16),1,32)) $+ $binary($gettok($bvar(&var,1-16),2,32)) $+ $binary($gettok($bvar(&var,1-16),3,32)) $+ $binary($gettok($bvar(&var,1-16),4,32))\r\n  if ($len(%mp3_bits) != 32) { echo 12 -a ERROR! The bits are the wrong length }\r\n  set %mp3.header $mid(%mp3_bits,1,11)\r\n  set %mp3.version $mid(%mp3_bits,12,2)\r\n  set %mp3.layer $mid(%mp3_bits,14,2)\r\n  set %mp3.crc $mid(%mp3_bits,16,1)\r\n  set %mp3.bitrate $mid(%mp3_bits,17,4)\r\n  set %mp3.mhz $mid(%mp3_bits,21,2)\r\n  set %mp3.pad $mid(%mp3_bits,23,1)\r\n  set %mp3.priv $mid(%mp3_bits,24,1)\r\n  set %mp3.channel $mid(%mp3_bits,25,2)\r\n  set %mp3.steriotype $mid(%mp3_bits,27,2)\r\n  set %mp3.cright $mid(%mp3_bits,29,1)\r\n  set %mp3.orig $mid(%mp3_bits,30,1)\r\n  set %mp3.emphisis $mid(%mp3_bits,31,2)\r\n  ;---version---\r\n  if (%mp3.version == 00) { set %mp3.v v2.5 }\r\n  if (%mp3.version == 10) { set %mp3.v v2 }\r\n  if (%mp3.version == 11) { set %mp3.v v1 }\r\n  else { set %mp3.v v1 }\r\n  ;---layer---\r\n  if (%mp3.layer == 01) { set %mp3.l iii }\r\n  else if (%mp3.layer == 10) { set %mp3.l ii }\r\n  else if (%mp3.layer == 11) { set %mp3.l i }\r\n  else { set %mp3.l iii }\r\n  set %mpeg %mp3.v $+ %mp3.l\r\n  :bitrate\r\n  set %index $findtok( [ $readini -n mp3.ini bitrate bits ] ,%mp3.bitrate,1,46)\r\n  set %mp3.out.bitrate $gettok( [ $readini -n mp3.ini bitrate %mpeg ] ,%index,46)\r\n  :mhz\r\n  set %index2 $findtok( [ $readini -n mp3.ini sample bits ] ,%mp3.mhz,1,46)\r\n  set %mp3.out.sample $gettok( [ $readini -n mp3.ini sample %mp3.v ] ,%index2,46)\r\n  return %mp3.out.bitrate  %mp3.out.sample $calc(($file($shortfn(%song)).size * 8) / (%mp3.out.bitrate * 1000) - 1))\r\n}\r\n\r\nalias cplay {\r\n  if (%mp3list == $null) {  set %mp3list $dir="What mp3 playlist would you like to use?" c:\\*.* }\r\n  if ($1 == $null) {\r\n    set %mp3i $rand(1, $lines($shortfn(%mp3list)))\r\n    set %song $read -l $+ %mp3i %mp3list\r\n  }\r\n  else {\r\n    set %song $1-\r\n  }\r\n  mp3 %song\r\n  set %mp3i $rand(1, $lines($shortfn(%mp3list)))\r\n  set %nextsong $read -l $+ %mp3i %mp3list\r\n  .timer50 1  $calc(($file($shortfn(%song)).size * 8) / (%mp3.out.bitrate * 1000) - 1)) cplay %nextsong\r\n  echo 14 -a Up Next: %nextsong\r\n}\r\nalias skip { cplay %nextsong }\r\nalias size { if ($1 < 1024) return $1 $+ b\r\n  elseif (($1 > 1024) && ($1 < 1048576)) return $round($calc($1 / 1024),1) $+ k\r\n  elseif (($1 < 1073741824)) return $round($calc($1 / 1048576),2) $+ mb\r\n  elseif (($1 < 1099511627776)) return $round($calc($1 / 1073741824),2) $+ gb\r\nelse return $round($calc($1 / 1099511627776),2) $+ tb }\r\nalias mp3 {\r\n  if (%mp3dir == $null) { set %mp3dir $sdir="What is your default mp3 directory?" }\r\n  if (%player == $null) { set %player $dir="What mp3 player would you like to use?" c:\\*.exe }\r\n  if ($1- == $null) { set %song $dir="Mp3 to read?" %mp3dir }\r\n  else { set %song $1- } \r\n  mp3read\r\n}\r\nalias mp3read {\r\n  bread $shortfn(%song) 0 16 &var\r\n  set %mp3_bits $binary($gettok($bvar(&var,1-16),1,32)) $+ $binary($gettok($bvar(&var,1-16),2,32)) $+ $binary($gettok($bvar(&var,1-16),3,32)) $+ $binary($gettok($bvar(&var,1-16),4,32))\r\n  if ($mid(%mp3_bits,1,11) != 11111111111) { \r\n    ;echo -a Error detected in %song $+ . Header is incorrect. Who in the hell made this mp3? Trying to fix.....\r\n    bread $shortfn(%song) 0 2048 &var\r\n    bwrite mp3debug.wri 0 2048 &var    \r\n    set %i 1\r\n    :read\r\n    if (%i > 4096) { echo -a undefined headerfile | goto end }\r\n    if ($bvar(&var,%i) == 255) {\r\n      ;echo 4 -a Problem fixed by using offset: 0x000 $+ %i \r\n      set %mp3_bits $binary($gettok($bvar(&var, [ %i ] - [ $calc(%i + 16) ] ),1,32)) $+ $binary($gettok($bvar(&var, [ %i ] - [ $calc(%i + 16) ] ),2,32)) $+ $binary($gettok($bvar(&var, [ %i ] - [ $calc(%i + 16) ] ),3,32)) $+ $binary($gettok($bvar(&var, [ %i ] - [ $calc(%i + 16) ] ),4,32))\r\n    goto end }\r\n    else { inc %i | goto read }\r\n  }\r\n  set %mp3_bits $binary($gettok($bvar(&var,1-16),1,32)) $+ $binary($gettok($bvar(&var,1-16),2,32)) $+ $binary($gettok($bvar(&var,1-16),3,32)) $+ $binary($gettok($bvar(&var,1-16),4,32))\r\n  :end\r\n  msg $chan Playing $chr(32) $+ %mp3i $+ / $+ $lines($shortfn(%mp3list)) [12 $+ $nopath(%song) $+ ] @ $mp3details($shortfn(%song)) $+  $size($file($shortfn(%song)).size) - $duration($calc(($file($shortfn(%song)).size * 8) / (%mp3.out.bitrate * 1000) - 1)))\r\n  run %player $shortfn(%song)\r\n  ;splay $shortfn(%song)\r\n}\r\nalias mp3debug {\r\n  if ($len(%mp3_bits) != 32) { echo 12 -a ERROR! The bits are the wrong length }\r\n  set %mp3.header $mid(%mp3_bits,1,11)\r\n  set %mp3.version $mid(%mp3_bits,12,2)\r\n  set %mp3.layer $mid(%mp3_bits,14,2)\r\n  set %mp3.crc $mid(%mp3_bits,16,1)\r\n  set %mp3.bitrate $mid(%mp3_bits,17,4)\r\n  set %mp3.mhz $mid(%mp3_bits,21,2)\r\n  set %mp3.pad $mid(%mp3_bits,23,1)\r\n  set %mp3.priv $mid(%mp3_bits,24,1)\r\n  set %mp3.channel $mid(%mp3_bits,25,2)\r\n  set %mp3.steriotype $mid(%mp3_bits,27,2)\r\n  set %mp3.cright $mid(%mp3_bits,29,1)\r\n  set %mp3.orig $mid(%mp3_bits,30,1)\r\n  set %mp3.emphisis $mid(%mp3_bits,31,2)\r\n  echo 4 -a  %mp3.header 9 %mp3.version 10 %mp3.layer 11 %mp3.crc 12 %mp3.bitrate 13 %mp3.mhz 8 %mp3.pad 7 %mp3.priv 6 %mp3.channel 5 %mp3.steriotype 3 %mp3.cright 2  %mp3.orig 4 %mp3.emphisis\r\n  echo 4 -a  header 9 ver 10 layer 11 crc 12 bitrate 13 mhz 8 pad 7 priv 6 chan 5 sterio 3 cright 2  orig 4 emph\r\n  echo -a  9 %mp3.v 10 %mp3.l 12 %mp3.out.bitrate 13 %mp3.out.sample\r\n}\r\nalias mp3debug2 {\r\n  if ($len(%mp3_bits) != 32) { echo 12 -a ERROR! The bits are the wrong length }\r\n  set %mp3.header $mid(%mp3_bits,1,11)\r\n  set %mp3.version $mid(%mp3_bits,12,2)\r\n  set %mp3.layer $mid(%mp3_bits,14,2)\r\n  set %mp3.crc $mid(%mp3_bits,16,1)\r\n  set %mp3.bitrate $mid(%mp3_bits,17,4)\r\n  set %mp3.mhz $mid(%mp3_bits,21,2)\r\n  set %mp3.pad $mid(%mp3_bits,23,1)\r\n  set %mp3.priv $mid(%mp3_bits,24,1)\r\n  set %mp3.channel $mid(%mp3_bits,25,2)\r\n  set %mp3.steriotype $mid(%mp3_bits,27,2)\r\n  set %mp3.cright $mid(%mp3_bits,29,1)\r\n  set %mp3.orig $mid(%mp3_bits,30,1)\r\n  set %mp3.emphisis $mid(%mp3_bits,31,2)\r\n  say 4  %mp3.header 9 %mp3.version 10 %mp3.layer 11 %mp3.crc 12 %mp3.bitrate 13 %mp3.mhz 8 %mp3.pad 7 %mp3.priv 6 %mp3.channel 5 %mp3.steriotype 3 %mp3.cright 2  %mp3.orig 4 %mp3.emphisis\r\n  say 4 header 9 ver 10 layer 11 crc 12 bitrate 13 mhz 8 pad 7 priv 6 chan 5 sterio 3 cright 2  orig 4 emph\r\n  say  9 %mp3.v 10 %mp3.l 12 %mp3.out.bitrate 13 %mp3.out.sample\r\n}\r\nalias mp3details {\r\n  if ($len(%mp3_bits) != 32) { echo 12 -a ERROR! The bits are the wrong length }\r\n  set %mp3.header $mid(%mp3_bits,1,11)\r\n  set %mp3.version $mid(%mp3_bits,12,2)\r\n  set %mp3.layer $mid(%mp3_bits,14,2)\r\n  set %mp3.crc $mid(%mp3_bits,16,1)\r\n  set %mp3.bitrate $mid(%mp3_bits,17,4)\r\n  set %mp3.mhz $mid(%mp3_bits,21,2)\r\n  set %mp3.pad $mid(%mp3_bits,23,1)\r\n  set %mp3.priv $mid(%mp3_bits,24,1)\r\n  set %mp3.channel $mid(%mp3_bits,25,2)\r\n  set %mp3.steriotype $mid(%mp3_bits,27,2)\r\n  set %mp3.cright $mid(%mp3_bits,29,1)\r\n  set %mp3.orig $mid(%mp3_bits,30,1)\r\n  set %mp3.emphisis $mid(%mp3_bits,31,2)\r\n  ;---version---\r\n  set %mp3.v $mp3ver(%mp3.version)\r\n  ;if (%mp3.version == 00) { set %mp3.v v2.5 }\r\n  ;if (%mp3.version == 11) { set %mp3.v v1 }\r\n  ;else { set %mp3.v v1 }\r\n  ;---layer---\r\n  if (%mp3.layer == 01) { set %mp3.l iii }\r\n  else if (%mp3.layer == 10) { set %mp3.l ii }\r\n  else if (%mp3.layer == 11) { set %mp3.l i }\r\n  else { set %mp3.l iii | set %mp3.bitrate 1001 }\r\n  set %mpeg %mp3.v $+ %mp3.l\r\n  :bitrate\r\n  set %index $findtok( [ $readini -n mp3.ini bitrate bits ] ,%mp3.bitrate,1,46)\r\n  set %mp3.out.bitrate $gettok( [ $readini -n mp3.ini bitrate %mpeg ] ,%index,46)\r\n  :mhz\r\n  set %index2 $findtok( [ $readini -n mp3.ini sample bits ] ,%mp3.mhz,1,46)\r\n  set %mp3.out.sample $gettok( [ $readini -n mp3.ini sample %mp3.v ] ,%index2,46)\r\n  return [ $+ %mp3.out.bitrate $+ kbps $+ / $+ %mp3.out.sample $+ Hz $+ ]\r\n}\r\nalias mp3ver {\r\n  if ($1 == 10) { return v2 }\r\n  if ($1 == 00) { return v2.5 }\r\n  if ($1 == 11) { return v1 }\r\n}\r\nalias binary {\r\n  if ($1 == $null) { set %input $$?="Enter a number to convert to binary" }\r\n  else { set %input $1 }\r\n  set %i 0\r\n  ;2048 1024 512 256   [= 128 64 32 16 8 4 2 1 = ]\r\n  if (%input > 4095) { echo -a 14the number is too big | halt }\r\n  else if (%input > 255) { halt }\r\n  else { goto 8 }\r\n  :8\r\n  if (%input >= 128) { \r\n    set %bit1 1\r\n    set %bit_temp $calc(%input - 128)\r\n  goto 7 }\r\n  else { \r\n    set %bit1 0\r\n    set %bit_temp %input \r\n  goto 7 }\r\n  :7\r\n  if  (%bit_temp >= 64) {\r\n    set %bit2 1\r\n    set %bit_temp $calc(%bit_temp - 64)\r\n  goto 6 }\r\n  else {\r\n    set %bit2 0\r\n  goto 6 }\r\n  :6\r\n  if  (%bit_temp >= 32) {\r\n    set %bit3 1\r\n    set %bit_temp $calc(%bit_temp - 32)\r\n  goto 5 }\r\n  else {\r\n    set %bit3 0\r\n  goto 5 }\r\n  :5\r\n  if  (%bit_temp >= 16) {\r\n    set %bit4 1\r\n    set %bit_temp $calc(%bit_temp - 16)\r\n  goto 4 }\r\n  else {\r\n    set %bit4 0\r\n  goto 4 }\r\n  :4\r\n  if  (%bit_temp >= 8) {\r\n    set %bit5 1\r\n    set %bit_temp $calc(%bit_temp - 8)\r\n  goto 3 }\r\n  else {\r\n    set %bit5 0\r\n  goto 3 }\r\n  :3\r\n  if  (%bit_temp >= 4) {\r\n    set %bit6 1\r\n    set %bit_temp $calc(%bit_temp - 4)\r\n  goto 2 }\r\n  else {\r\n    set %bit6 0\r\n  goto 2 }\r\n  :2\r\n  if  (%bit_temp >= 2) {\r\n    set %bit7 1\r\n    set %bit_temp $calc(%bit_temp - 2)\r\n  goto 1 }\r\n  else {\r\n    set %bit7 0\r\n  goto 1 }\r\n  :1\r\n  if  (%bit_temp >= 1) {\r\n    set %bit8 1\r\n    set %bit_temp $calc(%bit_temp - 1)\r\n  goto end }\r\n  else {\r\n    set %bit8 0\r\n  goto end }\r\n  :end\r\n  set %byte %bit1 $+ %bit2 $+ %bit3 $+ %bit4 $+ %bit5 $+ %bit6 $+ %bit7 $+ %bit8\r\n  return %byte\r\n  halt \r\n}\r\non 1:load:{\r\n  echo -a 3*** Checking script components\r\n\r\n  if (%player == $null) { set %player $dir="What mp3 player would you like to use?" c:\\*.exe }\r\n  echo -a 3* % $+ player is set to: %player\r\n  else { set %ask $?!="Would you like to change your mp3 player? (currently %player)" \r\n    if (%ask) { set %player $dir="What mp3 player would you like to use?" c:\\*.exe }\r\n  }\r\n\r\n  if (%mp3dir == $null) { set %mp3dir $sdir="What is your defaul mp3 directory?" }\r\n  echo -a 3* $chr(37) $+ mp3dir is set to: %mp3dir\r\n  else { set %ask $?!="Would you like to change your default mp3 directory? (currently %mp3dir)"\r\n    if (%ask) { set %mp3dir $sdir="What is your defaul mp3 directory?" }\r\n  }\r\n\r\n  if (%mp3list == $null) {  \r\n    set %ask $?!="Do you have an mp3list?" \r\n    if (%ask == $true) { set %mp3list $dir="What mp3 playlist would you like to use?" c:\\*.* }\r\n    else {  set %mp3listroot $sdir="Please select the upper most parent mp3 directory"\r\n      :ask\r\n      set %ask $?!="Would you like to add an additional root dir?"\r\n      if (%ask) {\r\n        set %mp3listroot %mp3listroot $sdir="Please select the upper most parent mp3 directory"\r\n        goto ask  \r\n      }\r\n      write -c mp3list.bat @echo off\r\n      write -a mp3list.bat echo **** Please wait while the list is being generated ****\r\n      write -c list.txt\r\n      if ( [ $numtok( [ $+ [ %mp3listroot ] ] ,32) ] > 1) {\r\n        set %i 1\r\n        :loop\r\n        if (%i > $numtok(%mp3listroot,32)) { goto end }\r\n        write -a mp3list.bat dir /b/s $gettok( [ %mp3listroot ] ,%i,32) $+ *.mp3 >> list.txt\r\n        inc %i\r\n        goto loop\r\n      }\r\n      else { write -a mp3list.bat dir /b/s %mp3listroot $+ *.mp3 > $mircdirlist.txt }\r\n\r\n      :end\r\n      write -a mp3list.bat echo ** ALL DONE! **\r\n      /run mp3list.bat\r\n      set %mp3list list.txt\r\n    }\r\n  }\r\n  echo -a 3* $chr(37) $+ mp3list is set to: %mp3list\r\n  echo -a 3* Setup is complete! Enjoy!\r\n}\r\n', 0, 'none', 'mp3.mrc', 'none');
INSERT INTO `pastebin` VALUES (2363, 'mroud', '2004-11-08 14:51:48', 'set script_bin {/home/egg/scripts/script.sh}\r\nset my_channel "#chan"\r\n\r\nproc script_proc_bind_cmd {nick uhost hand chan text} {\r\n         if {![string match [lrange [split $text] 0 1] "*hello*world*"]} {return}\r\n         set text [lrange [split $text] 2 end]\r\n         set output [exec $::script_bin [lindex $text 0]]\r\n         putserv "PRIVMSG $::my_channel :$output"\r\n}\r\n\r\nbind pubm -|- "*hello*world*" script_proc_bind_cmd', 0, 'tcl', 'last debug for leprechau.. thanks!!', '#EggTCL');
INSERT INTO `pastebin` VALUES (2364, 'leprechau', '2004-11-08 14:54:11', 'set script_bin {/home/egg/scripts/script.sh}\r\nset my_channel "#chan"\r\n\r\nproc script_proc_bind_cmd {nick uhost hand chan text} {\r\n         if {![string match *hello*world* [lrange [split $text] 0 1]]} {return}\r\n         set text [lrange [split $text] 2 end]\r\n         set output [exec $::script_bin [lindex $text 0]]\r\n         putserv "PRIVMSG $::my_channel :$output"; return\r\n}\r\n\r\nbind pubm -|- "*hello*world*" script_proc_bind_cmd', 2363, 'tcl', 'try this one', '#EggTCL');
INSERT INTO `pastebin` VALUES (2360, 'leprechau', '2004-11-08 12:55:52', '## probably a good idea to use very unique variable names here since these are in the global namespace\r\nset script_bin {/home/egg/scripts/script.sh}\r\nset my_channel "#chan"\r\n\r\n\r\n## best practice is to place binds immediatly after the proc they are bound to\r\n\r\n## ''args'' has special meaning in tcl when used in a proc declaration\r\n## unless you know how to handle it...don''t use it here..change to ''text''\r\n\r\nproc script_proc_bind_cmd {nick uhost hand chan text} {\r\n\r\n         ## see if the first 2 words really were ''hello world'' and if not return (stop)\r\n         if {![string equal [lrange [split $text] 0 1] "hello world"]} {return}\r\n\r\n         ## if we are still processing then looks like the first 2 words were right\r\n         ## this changes the value of $text to remove the first 2 words and makes it a list\r\n         set text [lrange [split $text] 2 end]\r\n\r\n         ## ''global'' is a bit deprecated, using namespace calls is alot better\r\n         ## the global namespace is always ::\r\n         ##global script_bin channel\r\n\r\n         set output [exec $::script_bin [lindex $text 0]]\r\n\r\n         ## unless you ALWAYS want the output to a certain channel...\r\n         ## NOT the channel they are spoken on then this is fine...\r\n         ## Just remember that you get $chan passed here which will \r\n         ## always be the channel the words were said\r\n         ## also..if your output is more than a line or so, you probably want ''puthelp'' here\r\n         putserv "PRIVMSG $my_channel :$output"\r\n}\r\n## -|- is the same as just - for these binds\r\nbind pubm - "*hello world*" script_proc_bind_cmd\r\n\r\n## these are all set for the bind types..the variable names\r\n## always in the same order you will get:\r\n## nick user@host handle channel text\r\n## usually listed as: nick uhost hand chan text\r\n## see doc/tcl-commands.doc in your eggdrop directory for all the other binds\r\n\r\nproc script_proc_bind_report {nick uhost hand chan text} {\r\n\r\n        ## use the namespace call here also..and i changed your global variable name to my_channel\r\n        ##global channel\r\n\r\n        ## same thing here as above...if you want it to report to channel where trigger was typed\r\n        ## just use $chan that you get passed by the bind\r\n        ## also...probably DO NOT want putquick here..putserv is fine\r\n        putserv "PRIVMSG $::my_channel :Yes, you got it!"\r\n} \r\nbind pub - !status script_proc_bind_report\r\n', 0, 'tcl', 'revised and commented script for mroud', '#EggTCL');
INSERT INTO `pastebin` VALUES (2359, 'leprechau', '2004-11-08 12:30:45', 'Script:\r\n# Slap Section\r\n# Bind command\r\nbind pub - slap pub:say2\r\n\r\n# Slappers\r\nset aslapr {\r\n  "around a bit with a large trout"\r\n  "with his bare hands"\r\n}\r\n\r\n# Proc\r\nproc pub:say2 {nick uhost hand chan arg} {\r\n	## you can take this global call out if you use namespace calls\r\n	##global aslapr\r\n	if {[onchan $arg $chan] [string equal $arg $::botnick]} {\r\n		## note the $::aslapr :: is the global namespace\r\n		putmsg $chan "\\001ACTION slaps $arg [lindex $::aslapr [rand [llength $::aslapr]]]"\r\n	} else {\r\n		putmsg $chan "$arg wasnt found on chan"\r\n	}\r\n	return\r\n}\r\n\r\nputlog "Loaded slaps by Barvaz"\r\n\r\n\r\nError:\r\n[20:12:57] <(F-B-I> [13:12] wrong # args: should be "proc name args body"\r\n[20:12:57] <(F-B-I>     while executing\r\n[20:12:57] <(F-B-I> "proc pub:say2 {nick uhost hand chan arg} {\r\n[20:12:57] <(F-B-I> 	global aslapr\r\n[20:12:57] <(F-B-I> 	if {[onchan "$arg" $chan] || [string equal $arg $::botnick]} {\r\n[20:12:57] <(F-B-I> 	putmsg $chan "\\001ACTION sl..."\r\n[20:12:57] <(F-B-I>     (file "scripts/slap.tcl" line 12)\r\n[20:12:57] <(F-B-I>     invoked from within\r\n[20:12:57] <(F-B-I> "source scripts/slap.tcl"', 2358, 'tcl', 'here you go...you had an extra } at the end of the first conditional body', '#EggTCL');
INSERT INTO `pastebin` VALUES (2329, 'MP5nyper', '2004-10-31 09:52:15', '## i was getting sick of ops voicing everyone.. so to solve this made this..\r\n## but i can get it to work right.. and i know it has todo with "matchchanattr $victim v $chan"\r\n##\r\n## Thanks MP5nyper\r\n\r\n## Code Start ##\r\n\r\nbind mode - "*+v*" uix(novoice)\r\nproc uix(novoice) {nick uhost hand chan mc {victim ""}} {\r\n  if {![matchchanattr $victim v $chan]} {\r\n    putquick "PRIVMSG $chan : $nick : $victim is a user.." ;# <-- For testing only #\r\n    return 0\r\n  } else {\r\n    putquick "MODE $chan -v $victim "\r\n  }\r\n}\r\n\r\n## Code END ##', 0, 'tcl', 'No Voice for you BeOtCh', '#EggTCL');
INSERT INTO `pastebin` VALUES (2330, 'none', '2004-10-31 10:26:04', '#include <stdio.h>\r\n\r\n#define DELAY           10000000L               //Verzoegerung\r\n#define CLS             printf("\\033[2J")       //Bildschirm loeschen\r\n#define LOCATE(z,s)     printf("\\033[\\%d;\\%dH", z, s)     //Cursor in\r\n\r\nvoid main()\r\n{\r\n        int x = 2, y = 3, dx = 1, geschw = 0;\r\n        long warten;\r\n\r\n        CLS;\r\n        LOCATE(1, 25); printf("**** Springender Ball ****");\r\n        LOCATE(25, 1);\r\n        printf("-------------------------------------------------------"\r\n               "-------------------------------------------------------");\r\n\r\n        while(1)\r\n        {\r\n                LOCATE( y,x); printf("o");\r\n\r\n                for( warten = 0; warten < DELAY; ++warten)\r\n                        if(x == 1 || x == 79) dx = -dx;\r\n\r\n                        if(y == 24)\r\n                        {\r\n                                geschw = -geschw;\r\n                                if(geschw == 0) geschw = -7;\r\n                        }\r\n\r\n                        geschw += 1;\r\n                        LOCATE( y,x); printf(" ");\r\n                        y += geschw; x += dx;\r\n\r\n        }\r\n}\r\n', 0, 'c', 'c app', 'none');
INSERT INTO `pastebin` VALUES (2310, 'eghah', '2004-10-05 05:56:01', 'proc ns_identify {nick uhost hand channel args} {\r\n        global ns_ok\r\n        if {$ns_ok} {\r\n                if {$nick == "NickServ"} {\r\n                        global ns_password\r\n                        putserv "PRIVMSG $nick :IDENTIFY $ns_password" -next\r\n                        putlog $idx "Sending identify information to NickServ..."\r\n                }\r\n        } else {\r\n                putlog "No authentification inforamtion found. Use .setnspass <password> to set."\r\n        }\r\n', 0, 'tcl', 'help me', 'none');
INSERT INTO `pastebin` VALUES (2311, 'leprechau', '2004-10-05 13:08:36', 'proc eputserv {key text} {\r\n   set message [string range $text [expr [string first {:} $text] +1] end]\r\n   set pre [string range $text 0 [expr [string first {:} $text] -1]]\r\n   putserv "$pre :+OK [encrypt $key $message]"\r\n}\r\n\r\njust replace your purservs...example:\r\n\r\nchange: putserv "PRIVMSG $chan :$line"\r\n\r\nto: eputserv abc123 "PRIVMSG $chan :$line"\r\n\r\nwhere ''abc123'' is the encryption key you want to use...this may also be a variable\r\n\r\nexample: eputserv $key "PRIVMSG $chan :$line"\r\n', 0, 'tcl', 'simple wrapper proc', '#EggTCL');
INSERT INTO `pastebin` VALUES (2473, 'LAL', '2004-12-04 11:50:07', 'proc ApacheCheck {} {\r\nset file {C:/Program/Apache Group/Apache2/logs/access.log}\r\nset handle [open $file r]\r\nset content [split [read $handle] [format %c 10]]\r\nclose $handle\r\nset out [lrange $content end-1 end]\r\n\r\nvariable CheckApache\r\nif {![string equal $out $CheckApache]} {\r\nset CheckApache "$lines" \r\nputhelp "PRIVMSG #apache-log :[join [ApacheReformat $out]]"\r\n}\r\nutimer 1 ApacheCheck\r\nreturn 1\r\n}\r\n', 2472, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2474, 'Robb', '2004-12-04 12:18:13', 'if {![info exist CheckApache]} {\r\nvariable CheckApache {}\r\nutimer 1 ApacheCheck\r\n}\r\n\r\nproc ApacheCheck {} {\r\nset file {C:/Program/Apache Group/Apache2/logs/access.log}\r\nset handle [open $file r]\r\nset content [split [read $handle] [format %c 10]]\r\nclose $handle\r\nset out [lrange $content end-2 end]\r\nvariable CheckApache\r\nif {![string equal $out $CheckApache]} {\r\nset CheckApache "$out" \r\nputhelp "PRIVMSG #apache-log :[ApacheReformat [join $out]]"\r\n}\r\nutimer 1 ApacheCheck\r\n}\r\n\r\nproc ApacheReformat {string} {\r\n  set string [split $string [format %c 32]]\r\n  set time [join [lrange [split [lindex $string 3] :] 1 3] :]\r\n  set request [string trimleft [join [lrange $string 5 6]] {"}]\r\n  return "\\[$time\\] <[lindex $string 0]> $request ([lrange $string 8 9])"\r\n}', 2473, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2472, 'Robb', '2004-12-04 10:12:34', 'if {![info exist CheckApache]} {\r\nvariable CheckApache {}\r\ntimer 2 ApacheCheck\r\n}\r\n\r\nproc ApacheCheck {} {\r\nvariable CheckApache\r\nset file {C:/Program/Apache Group/Apache2/logs/access.log}\r\nset fid [open $file r]\r\nset read [split [read $fid] \\n]\r\nset out [lrange $read end-2 end]\r\nset lines [llength $read]\r\nclose $fid\r\n\r\nif {$lines > $CheckApache} {\r\nset CheckApache "$lines"\r\nputhelp "PRIVMSG #apache-log :Log change:"\r\nforeach u $out {\r\nputhelp "PRIVMSG #apache-log :[join $u]"\r\n}\r\n}\r\ntimer 2 ApacheCheck\r\nreturn 1\r\n}\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2469, 'BL4DE', '2004-12-03 11:01:30', 'bind pub - "liker du int?" pub:likint\r\n\r\nproc pub:likint { nick user hand chan arg } {\r\n        putlog "seems like its running"\r\n        puthelp "PRIVMSG #norge :Åja ;) Vi koser dagen lang.... int: finne på no? *Hint Hint*"\r\n        return 0\r\n}', 2468, 'tcl', 'try this', '#EggTCL');
INSERT INTO `pastebin` VALUES (2470, 'andreas', '2004-12-03 13:15:05', '### END OF CONFIG OPTIONS ###\r\n\r\nif {[info exists bcqueue]} {unset bcqueue}\r\nset bchan(chans) ""\r\nproc bmaskhost {uhost} { \r\n \r\nif {[string match -nocase *@*.users.undernet.org $uhost]} {return "*!*[join [regexp -inline -- {@[^@].+} $uhost]]"}\r\n \r\nset uhost [lindex [split $uhost !] [expr [llength [split $uhost !]] -1]]\r\nset temp [string range [lindex [split $uhost @] 0] [expr [string length [lindex [split $uhost @] 0]] - 8] e]\r\nreturn "*!*$temp@[lindex [split [maskhost *!*@[lindex [split $uhost @] 1]] @] 1]"\r\n}\r\n\r\nproc bchan_read {} {\r\n  global bchan\r\n  set fd [open scripts/badchan.conf r]\r\n  while {![eof $fd]} {\r\n    set inp [gets $fd]\r\n    if {[string trim $inp " "] == ""} {continue}\r\n    set ban [lrange $inp 1 e]\r\n    set chan [string tolower [lindex $inp 0]]\r\n    if {[lsearch $bchan(chans) $chan] == -1} {lappend bchan(chans) $chan}\r\n    lappend bchan($chan) $ban\r\n  }\r\n  close $fd\r\n  putlog "badchan.conf loaded."\r\n}\r\nputlog "Bass''s badchan.tcl 1.0 loaded"\r\nif {[file exists scripts/badchan.conf]} {bchan_read} {putlog "badchan.conf not found!"}\r\n\r\nproc bc_flood_init {} {\r\n  global bc_flood bc_flood_num bc_flood_time bc_flood_array\r\n  if {![string match *:* $bc_flood]} {putlog bchan: var bc_flood not set correctly. ; return 1}\r\n  set bc_flood_num [lindex [split $bc_flood :] 0]\r\n  set bc_flood_time [lindex [split $bc_flood :] 1]\r\n  set i [expr $bc_flood_num - 1]\r\n  while {$i >= 0} {\r\n    set bc_flood_array($i) 0\r\n    incr i -1\r\n  }\r\n} ; bc_flood_init\r\n\r\nproc bc_flood {nick uhost} {\r\n  global bc_flood_num bc_flood_time bc_flood_array\r\n  if {$bc_flood_num == 0} {return 0}\r\n  set i [expr $bc_flood_num - 1]\r\n  while {$i >= 1} {\r\n    set bc_flood_array($i) $bc_flood_array([expr $i - 1])\r\n    incr i -1\r\n  }\r\n  set bc_flood_array(0) [unixtime]\r\n  if {[expr [unixtime] - $bc_flood_array([expr $bc_flood_num - 1])] <= $bc_flood_time} {\r\n    putlog "bchan: Flood detected from $nick."\r\n    #newignore [join [maskhost *!*[string trimleft $uhost ~]]] bchan flood 2\r\n    return  1\r\n  } {return 0}\r\n}\r\n\r\n\r\nbind join -|- * bchan_join\r\n\r\nproc bchan_join {nick uhost hand chan} {\r\n global bchan bcqueue bcnicks botnick\r\n if {[matchattr [nick2hand $nick $chan] bmnof|mnof $chan]} {return 0}\r\n set host [string tolower [lindex [split $uhost @] 1]]\r\n set chan [string tolower $chan]\r\n set nick [string tolower $nick]\r\n if {[lsearch $bchan(chans) $chan] == -1 && ([lsearch $bchan(chans) global] == -1 || [lsearch $bchan(exempt) $chan] > -1)} {return 0}\r\n if {[string tolower $botnick] == [string tolower $nick]} {return 0}\r\n if {![botisop $chan]} {return 0}\r\n if {$bchan(protect-hosts) != ""} {\r\n  foreach i $bchan(protect-hosts) {\r\n   if {[string match [string tolower $i] $host]} {return 0}\r\n  }\r\n }\r\n if {[info exists bcqueue($host)]} {return 0}\r\n set bcqueue($host) 1 \r\n if {[bc_flood $nick $uhost]} {return 0}\r\n set bcnicks($nick) $chan\r\n putserv "whois $nick" \r\n set i 0 \r\n set temp ""\r\n while {$i < [string length $nick]} {\r\n   if {[string index $nick $i] == "\\\\"} {append temp "\\\\\\\\"} elseif {\r\n   [string index $nick $i] == "\\["} {append temp "\\\\\\["} elseif {\r\n   [string index $nick $i] == "\\]"} {append temp "\\\\\\]"} elseif {\r\n   [string index $nick $i] == "\\{"} {append temp "\\\\\\{"} elseif {\r\n   [string index $nick $i] == "\\}"} {append temp "\\\\\\}"} {\r\n   append temp [string index $nick $i]}\r\n   incr i\r\n } ; set nick $temp\r\n timer $bchan(rescan) "unset bcqueue($host) ; unset bcnicks($nick)"\r\n}\r\n\r\nbind raw - 319 bc_whois\r\nproc bc_whois {from key args} {\r\n  global bchan bcqueue bcnicks\r\n#  putlog "319: $args"\r\n  set args [join $args]\r\n  set nick [string tolower [lindex $args 1]]\r\n  if {[info exists bcnicks($nick)]} {set chan $bcnicks($nick)} {return 0}\r\n  set chans [string tolower [lrange $args 2 e]]\r\n  if {[lsearch $bchan(exempt) $chan] == -1 && $bchan(global) != ""} {set bans $bchan(global)} {set bans ""}\r\n  if {[lsearch $bchan(chans) $chan] > -1} {set bans "$bans $bchan($chan)"}\r\n  foreach tok $chans {\r\n    set tok [string trimleft $tok ":@+"]\r\n    foreach ban $bans {\r\n      if {[string match [lindex $ban 0] $tok]} {\r\n        putlog "badchan:  match! $nick k/b''d from $chan because [lrange $ban 1 e]"\r\n        putlog "args: $args, ban: $ban"\r\n        if {[onchan $nick $chan]} {newchanban $chan [bmaskhost [getchanhost $nick $chan]] badchan "[lrange $ban 1 e]" 10}\r\n        return 0\r\n      }\r\n    }\r\n  }\r\n  return 0\r\n}\r\nbind pub n|- !gbclist bc_glist\r\nproc bc_glist {1 2 3 4 5} {bc_list $1 $2 $3 global $5}\r\nbind pub o|o !bclist bc_list\r\nproc bc_list {nick uhost hand chan args} {\r\n  global bchan\r\n  set chan [string tolower $chan]\r\n  if {[lsearch $bchan(chans) $chan] == -1} {puthelp "notice $nick :No badchans are registered for $chan." ; return 1}\r\n  set i 1\r\n  puthelp "notice $nick :BadChans for $chan..."\r\n  foreach ban $bchan($chan) {\r\n    puthelp "notice $nick :$i) $ban"\r\n    incr i\r\n  }\r\n}\r\nbind pub n|- !gabc bc_gadd\r\nproc bc_gadd {1 2 3 4 5} {bc_add $1 $2 $3 global $5}\r\nbind pub o|o !abc bc_add\r\nproc bc_add {nick uhost hand chan args} {\r\n  global bchan\r\n  set chan [string tolower $chan]\r\n  if {![string match *\\\\\\** [lindex $args 0]]} {puthelp "notice $nick :syntax is: !abc <chanmask> \\[reason\\]" ; return 1}\r\n  set args [string trimright "[string tolower [lindex $args 0]] [lrange $args 1 e]" " "]\r\n  if {[lsearch $bchan(chans) $chan]} {lappend bchan(chans) $chan}\r\n  lappend bchan($chan) $args\r\n  puthelp "notice $nick :[lindex $args 0] was added to $chan''s badchan list."\r\n  bchan_save\r\n  return 1\r\n}\r\nbind pub n|- !grbc bc_grem\r\nproc bc_grem {1 2 3 4 5} {bc_rem $1 $2 $3 global $5}\r\nbind pub o|o !rbc bc_rem\r\nproc bc_rem {nick uhost hand chan args} {\r\n  global bchan\r\n  set chan [string tolower $chan]\r\n  set args [string tolower [lindex [join $args] 0]]\r\n  if {[lsearch $bchan(chans) $chan] == -1} {puthelp "notice $nick :No badchans are registered for $chan." ; return 1}\r\n  if {![string match *\\\\\\** $args]} {puthelp "notice $nick :syntax is: !rbc <chanmask>" ; return 1}\r\n  set i 0\r\n  set temp ""\r\n  foreach ban $bchan($chan) {\r\n    if {[string compare $args [lindex $ban 0]] == 0} {incr i} {lappend temp $ban}\r\n  }\r\n  if {$i > 0} {\r\n    if {$temp != ""} {set bchan($chan) $temp} {\r\n      unset bchan($chan)\r\n      set temp [lsearch $bchan(chans) $chan]\r\n      if {$temp == -1} {putlog "bchan: I''m confused." ; return 1}\r\n      set bchan(chans) [lreplace $bchan(chans) $temp $temp]\r\n    }\r\n    puthelp "notice $nick :$args was removed from $chan''s badchan list."\r\n    bchan_save\r\n  } {puthelp "notice $nick :$args was not found in $chan''s badchan list."}\r\n  return 1\r\n}\r\nproc bchan_save {} {\r\n  global bchan\r\n  set fd [open scripts/badchan.conf w]\r\n  foreach chan $bchan(chans) {\r\n    foreach ban $bchan($chan) {\r\n      puts $fd "$chan $ban"\r\n    }\r\n  }\r\n  close $fd\r\n}', 2141, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2471, 'Juzzy', '2004-12-03 22:34:31', 'void free_to(struct message *msg){\r\n	struct rcptto *top;\r\n	struct rcptto *nextto;\r\n	struct addheader *hp;\r\n	struct addheader *nexth;\r\n\r\n	if (msg->to == NULL)\r\n		return;\r\n	top = msg->to;\r\n	while(top != NULL) {\r\n			hp=top->header;\r\n			while(hp != NULL) {\r\n				nexth=hp->next;\r\n				if (hp->subject != NULL) {\r\n					free(hp->subject);\r\n					hp->subject = NULL;\r\n				}\r\n				free(hp->header);\r\n				free(hp);\r\n				hp=nexth;\r\n			}\r\n		nextto = top->next;\r\n		free(top->to);\r\n		free(top);\r\n		top = nextto;\r\n	}\r\n	msg->to = NULL;\r\n}\r\n', 0, 'c', 'free that shit', 'none');
INSERT INTO `pastebin` VALUES (2467, 'joe-', '2004-12-02 13:16:57', '# If i use this in my big script-proc, it isn''t working,\r\n# neither if i call a "own" proc for it.\r\n# The weird thing is, that from my debugging i can see that this [utimers]\r\n# doesn''t show the same output as if i bind it to an own proc (see below)\r\n#############################################################################\r\nset tImers ""\r\nforeach timer [utimers] { \r\n	if {$timer != "" && ![string match *JumpCup:LogReader* $timer] && ![string match *qnet:chktimer* $timer]} { \r\n		killutimer [lrange $timer end-0 end]\r\n		set tImers "$tImers[lrange $timer end-0 end] "\r\n	}\r\n}\r\n\r\n\r\n# But if i bind the script to a !kill-trigger, it works.\r\n# Someone maybe could explain this to me ;)\r\n\r\nbind pub - !kill JumpCup:KillTimers1\r\n\r\nproc JumpCup:KillTimers1 {nick uhost hand chan text} {\r\n	global conf \r\n	set tImers ""\r\n	foreach timer [utimers] { \r\n		if {$timer != "" && ![string match *JumpCup:LogReader* $timer] && ![string match *qnet:chktimer* $timer]} { \r\n			killutimer [lrange $timer end-0 end]\r\n			set tImers "$tImers[lrange $timer end-0 end] "\r\n		}\r\n	}\r\n}\r\n\r\n# I got to get this work''n ;)', 0, 'tcl', 'utimers not working', '#EggTCL');
INSERT INTO `pastebin` VALUES (2468, 'Andreas', '2004-12-03 10:57:48', 'bind pub - "liker du int?" pub:likint\r\n\r\nproc pub:likint { nick user hand chan arg } {\r\n        puthelp "PRIVMSG #norge :Åja ;) Vi koser dagen lang.... int: finne på no? *Hint Hint*"\r\n        return 0\r\n}\r\n', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2460, 'Robb', '2004-11-28 23:55:06', 'if {[catch {socket www.site.com 80} error]} { puthelp "PRIVMSG #channel :Couldnt connect to www.site.som.. with this error: $error"}\r\nset sock [socket www.site.com 80]\r\nfconfigure $sock -buffering line -buffersize 10000\r\nputs $sock "GET PATH/ HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla??"\r\nputs $sock "Host: www.site.com"\r\nputs $sock ""\r\nflush $sock\r\n\r\nwhile {![eof $sock]} {\r\ngets $sock lines\r\nputhelp "PRIVMSG #channel :$lines"\r\n}\r\n\r\nclose $sock', 2459, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2456, 'flin', '2004-11-27 22:03:00', '#hi there :) let''s say:\r\n\r\n# some_url contains:\r\n#\r\n# aaa <aaa\r\n# bbb <bbb\r\n# aba <ddd\r\n\r\nbind pub - !test ptest\r\n\r\nproc ptest {nick host handle chan arg} {\r\n\r\n set url "http://some_url"\r\n set conn [::http::geturl $url]\r\n set data [::http::data $conn]\r\n\r\n foreach line [split $data \\n] {\r\n  if {[string first "a" $line] != -1} {\r\n   set line [join $line]\r\n   foreach line [split $line "<"] {\r\n    if {[string first "<" $line] != -1} {\r\n     puthelp "privmsg $chan :$line"\r\n    }\r\n   }\r\n  }\r\n }\r\n}\r\n\r\n#it just wont start here this way, anyone can help me?', 0, 'tcl', 'need help for, i think, split and join', '#EggTCL');
INSERT INTO `pastebin` VALUES (2457, 'Robb', '2004-11-28 23:38:24', 'set sock [socket www.site.com 80\r\nfconfigure $sock -buffering line -buffersize 10000\r\nputs $sock "GET PATH/ HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla??"\r\nputs $sock "Host: www.site.com"\r\nputs $sock ""\r\nflush $sock\r\n\r\nwhile {![eof $sock]} {\r\ngets $sock lines\r\nputhelp "PRIVMSG #channel :$lines"\r\n}', 0, 'none', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2458, 'Anonymous', '2004-11-28 23:48:18', 'set sock [socket www.site.com 80]\r\nfconfigure $sock -buffering line -buffersize 10000\r\nputs $sock "GET PATH/ HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla??"\r\nputs $sock "Host: www.site.com"\r\nputs $sock ""\r\nflush $sock\r\n\r\nclose $sock\r\n\r\nwhile {![eof $sock]} {\r\ngets $sock lines\r\nputhelp "PRIVMSG #channel :$lines"\r\n}', 2457, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2459, 'Robb', '2004-11-28 23:50:27', 'set sock [socket www.site.com 80]\r\nfconfigure $sock -buffering line -buffersize 10000\r\nputs $sock "GET PATH/ HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla??"\r\nputs $sock "Host: www.site.com"\r\nputs $sock ""\r\nflush $sock\r\n\r\nwhile {![eof $sock]} {\r\ngets $sock lines\r\nputhelp "PRIVMSG #channel :$lines"\r\n}\r\n\r\nclose $sock', 2458, 'none', 'use this', '#EggTCL');
INSERT INTO `pastebin` VALUES (2376, 'Br[oO]T', '2004-11-10 17:56:05', 'setproc pub_lol_devoice {nick host hand chan arg} {\r\n	set arg [charfilter $arg]\r\n\r\nproc charfilter {x {y ""} } {\r\n	for {set i 0} {$i < [string length $x]} {incr i} {\r\n		switch -- [string index $x $i] {\r\n			"\\"" {append y "\\\\\\""}\r\n			"\\\\" {append y "\\\\\\\\"}\r\n			"\\[" {append y "\\\\\\["}\r\n			"\\]" {append y "\\\\\\]"}\r\n			"\\} " {append y "\\\\\\} "}\r\n			"\\{" {append y "\\\\\\{"}\r\n			default {append y [string index $x $i]}\r\n		}\r\n	}\r\n	return $y\r\n}', 0, 'tcl', 'none', 'none');
INSERT INTO `pastebin` VALUES (2377, 'tomb0y', '2004-11-10 19:31:42', 'proc checkchannel {nick uhost handle chan} {\r\n    global mainchan\r\n    if {[lsearch -exact $mainchan $chan] == -1} {\r\n        putserv "PRIVMSG $chan : DENIED"\r\n    } else {\r\n        putserv "PRIVMSG $chan : APPROVED"\r\n    }\r\n}\r\n', 0, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2378, '[Si|0]', '2004-11-10 19:37:47', 'proc checkchannel {nick uhost handle chan} {\r\n    global mainchan\r\n    if {$chan==$mainchan} {} {\r\n        putserv "PRIVMSG $chan : APPROVED"\r\n    } else {\r\n        putserv "PRIVMSG $chan : DENIED"\r\n    }\r\n}', 2377, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2379, '[Si|0]', '2004-11-10 19:40:23', 'proc checkchannel {nick uhost handle chan} {\r\n    global mainchan\r\n    if {$chan==$mainchan} {\r\n        putserv "PRIVMSG $chan : APPROVED"\r\n    } else {\r\n        putserv "PRIVMSG $chan : DENIED"\r\n    }\r\n}', 2378, 'none', 'Fixed :P', 'none');
INSERT INTO `pastebin` VALUES (2380, '[Si|0]', '2004-11-10 19:40:39', 'proc checkchannel {nick uhost handle chan} {\r\n    global mainchan\r\n    if {$chan==$mainchan} {\r\n        putserv "PRIVMSG $chan : APPROVED"\r\n    } else {\r\n        putserv "PRIVMSG $chan : DENIED"\r\n    }\r\n}', 2378, 'tcl', 'Fixed :P', '#EggTCL');
INSERT INTO `pastebin` VALUES (2381, 'joe-', '2004-11-11 10:38:00', 'bind pub - !hello sendmsg\r\n\r\nproc sendmsg {nick uhost hand chan text} {\r\nputserv "PRIVMSG $nick :Hello there $text, $nick greets you!"\r\n}', 0, 'tcl', 'here you go Fiwarelli', '#TCL');
INSERT INTO `pastebin` VALUES (2382, 'Barvaz', '2004-11-11 15:44:42', '# Kiss\r\n# Bind command\r\nbind pub - kiss pub:say3\r\n\r\n# Proc\r\nproc pub:say3 {nick uhost hand chan arg} {\r\n	## you can take this global call out if you use namespace calls\r\n	##global aslapr\r\n	if {[string equal $arg $::botnick]} {\r\n		## note the $::aslapr :: is the global namespace\r\n		putmsg $chan "\\001ACTION got a kiss from $nick\\001"\r\n	} elseif {[string equal $nick $arg]} {\r\n		putmsg $chan "$nick, sending a kiss to yourself wont get you far."\r\n	} elseif {[onchan $arg $chan]} {\r\n		putmsg $chan "\\001ACTION sent a kiss to $arg from $nick\\001"\r\n	} else {\r\n		putmsg $chan "$arg wasnt found on the chan."\r\n	}\r\n\r\n}\r\n\r\nputlog "Loaded kisser by Barvaz"', 0, 'tcl', 'Kiss script', '#EggTCL');
INSERT INTO `pastebin` VALUES (2383, 'leprechau', '2004-11-11 15:53:59', '## a switch statement for this might look something like the following...\r\n##\r\nswitch -- $arg {\r\n	$::botnick {putmsg $chan "\\001ACTION got a kiss from $nick\\001"}\r\n	$nick {putmsg $chan "$nick, sending a kiss to yourself wont get you far."}\r\n	default {\r\n		if {[onchan $arg $chan]} {\r\n			putmsg $chan "\\001ACTION sent a kiss to $arg from $nick\\001"\r\n		} else {putmsg $chan "$arg wasnt found on the chan."}\r\n	}\r\n}\r\n\r\n\r\n# Kiss\r\n# Bind command\r\nbind pub - kiss pub:say3\r\n\r\n# Proc\r\nproc pub:say3 {nick uhost hand chan arg} {\r\n	## you can take this global call out if you use namespace calls\r\n	##global aslapr\r\n	if {[string equal $arg $::botnick]} {\r\n		## note the $::aslapr :: is the global namespace\r\n		putmsg $chan "\\001ACTION got a kiss from $nick\\001"\r\n	} elseif {[string equal $nick $arg]} {\r\n		putmsg $chan "$nick, sending a kiss to yourself wont get you far."\r\n	} elseif {[onchan $arg $chan]} {\r\n		putmsg $chan "\\001ACTION sent a kiss to $arg from $nick\\001"\r\n	} else {\r\n		putmsg $chan "$arg wasnt found on the chan."\r\n	}\r\n\r\n}\r\n\r\nputlog "Loaded kisser by Barvaz"', 2382, 'tcl', 'not the perfect example of a switch...but it gives you an idea', '#EggTCL');
INSERT INTO `pastebin` VALUES (2504, 'FazLeeeN', '2004-12-19 20:24:43', 'load fbsql.so\r\nbind pub - !addnews pub_addnews\r\nproc pub_addnews {nick uhost hand chan arg} {\r\n  sql connect localhost daftpunk "mypass" chan_news\r\n  set sql [sql "INSERT INTO tbl_news (newspost , poster) VALUES (''$addnews'' , ''$nick'')"]\r\n  sql disconnect\r\n}\r\n', 0, 'tcl', 'Daftpunk''s SQL', '#EggTCL');
INSERT INTO `pastebin` VALUES (2505, 'smashkode', '2004-12-19 21:54:42', 'I am editing a script to do the following things on a TEXT TRIGGER.  The part I cannot figure out\r\nis how to get the script to do the things as listed in order, instead of randomly.\r\n\r\n\r\n-- Here is what I want the script to do ...\r\n\r\n\r\n\r\nset {mc_resp(*test*)}		{"/me warns %nick :: Warning #1"\r\n                                 "/me warns %nick :: Warning #2 - Kicked"\r\n                                 "/me warns %nick :: Warning #3 - Banned"}\r\n\r\n-- Im pretty sure this is the line that needs to be changed ...\r\n\r\nset alltext [lindex $text [rand [llength $text]]]\r\n\r\n-- Here''s the code in it''s original form ...\r\n\r\n # loop through all above responses with the received line:\r\n # "search" is the received line.\r\n foreach search [string tolower [array names mc_resp]] {\r\n\r\n  # if we have a match:  \r\n  # (if "search" (*hello*bob*) matches "args" (why, hello bob!))\r\n  if {[string match $search $args]} {\r\n\r\n   # put the entire message (bot reply) in the text variable since we''ll be using it:\r\n   set text [mc:resp:rep $mc_resp($search) $nick $uhost $hand $chan]\r\n\r\n   # pick a random reply if there are multiple defined:\r\n   set alltext [lindex $text [rand [llength $text]]]\r\n\r\n   # if the reply contains a \\n, split it in multiple commands:\r\n   set alltext [split $alltext "\\n"]\r\n   foreach text $alltext {\r\n\r\n    # strip any spaces at end or front\r\n    set text [string trim $text]\r\n\r\n		# search : *hello*bob*\r\n		# args   : hello bob, good to see you\r\n		# text   : Thanks, it''s good to see you too\r\n\r\n\r\n    # lets see if we can assign text to variables:\r\n    regsub -all "\\\\*" $search "(.\\*)" regtext\r\n\r\n    set TXT1 "."\r\n    set TXT2 "."\r\n    set TXT3 "."\r\n    set TXT4 "."\r\n    set TXT5 "."\r\n    set TXT6 "."\r\n\r\n    regexp $regtext $args match_var TXT1 TXT2 TXT3 TXT4 TXT5 TXT6\r\n\r\n    regsub "%1" $text $TXT1 text\r\n    regsub "%2" $text $TXT2 text\r\n    regsub "%3" $text $TXT3 text\r\n    regsub "%4" $text $TXT4 text\r\n    regsub "%5" $text $TXT5 text\r\n    regsub "%6" $text $TXT6 text', 0, 'tcl', 'IN ORDER instead of random?', '#EggTCL');
INSERT INTO `pastebin` VALUES (2506, 'FazLeeeN', '2004-12-20 11:04:54', 'listen 1456 test:chat\r\nproc test:chat {newidx} {\r\n  control $newidx listen:fff\r\n}\r\nproc listen:fff {text} {\r\n  puthelp "privmsg #hd 11"\r\n}\r\nit sends a dcc chat and it opens, no login need.\r\nbut i write something to the bot, the dcc chat disconnect and i''ve an error\r\n\r\nDCC Chat session\r\n-\r\nClient: q8knight (66.225.200.150)\r\nTime: Mon Dec 20 20:01:24 2004\r\n-\r\nAcknowledging chat request...\r\nDCC Chat connection established\r\n-\r\n20:01:33 ¤ <FazLeeeN> test\r\n-\r\nDCC session closed\r\n\r\n20:01:33 ¤ <q8knight> [12:01] Tcl error [listen:fff]: wrong # args: should be "listen:fff text"\r\n\r\ni also tried proc listen:fff {} {', 0, 'tcl', 'dcc chat', '#TCL');
INSERT INTO `pastebin` VALUES (2507, 'tomb0y', '2004-12-20 17:07:16', 'channel="\\#mychannel"\r\n\r\n#doesnt work\r\n(echo NEW\r\n    echo username\r\n    echo password\r\n    echo .chattr tomb0y +ao\r\n    echo .+chan $channel\r\n    echo .save\r\n    echo .quit)| nc localhost 5555 >/dev/null\r\n\r\n\r\n#works\r\n(echo NEW\r\n    echo username\r\n    echo password\r\n    echo .chattr tomb0y +ao\r\n    echo .+chan \\#mychannel\r\n    echo .save\r\n    echo .quit)| nc localhost 5555 >/dev/null\r\n\r\n', 0, 'bash', 'none', 'none');
INSERT INTO `pastebin` VALUES (2508, 'BL4DE', '2004-12-21 09:06:23', '    6l. I GET "ld-elf.so.1: Shared object "libtcl80.so.1" not found" or\r\n        "eggdrop: error in loading shared libraries libtcl8.1.so: \\\r\n        cannot open shared object file: No such file or directory" WHEN I TRY\r\n        TO START MY BOT.\r\n\r\n      ''./configure'' is looking in the wrong place for Tcl; it looks like it\r\n      compiled with one version of Tcl and tries to load another. Maybe your\r\n      sysadmin upgraded Tcl and didn''t tell you. In that case, you should just\r\n      need to recompile your bot.\r\n\r\n      Maybe, when upgrading, he didn''t clean the old version of Tcl and\r\n      ''./configure'' is looking for the files in the wrong places, or trying\r\n      to use different versions of tcl.h and libtcl*. Smack your admin and\r\n      have him install Tcl properly. ;)\r\n\r\n      You can also try:\r\n\r\n        ./configure --with-tcllib=<path-to-tcl-lib>\r\n                    --with-tclinc=<path-to-tcl-inc>\r\n\r\n      This will tell configure where to look for the Tcl files.\r\n\r\n      Try looking for libtcl by:\r\n\r\n        ls /usr/lib/libtcl*\r\n        ls /usr/local/lib/libtcl*\r\n\r\n      Try looking for tcl.h by:\r\n\r\n        ls /usr/include/tcl.h\r\n        ls /usr/local/include/tcl.h\r\n\r\n        If everything else fails, try to install Tcl to your home dir ;)\r\n        (Suggested by dw@Undernet, dw@lixom.nu) ', 0, 'none', 'copy/paste from the readme', '#EggTCL');
INSERT INTO `pastebin` VALUES (2509, 'leprechau', '2004-12-21 13:40:28', '## some little tests\r\n## array or list doesn''t really matter for 1000 elements\r\n## array only slightly faster\r\n##\r\n\r\n% for {set x 0} {$x <= 1000} {incr x} {lappend testList $x}\r\n% time {lindex $testList 600} 1000\r\n4 microseconds per iteration\r\n\r\n% for {set x 0} {$x <= 1000} {incr x} {array set testArray "$x $x"}    \r\n% time {set testArray(600)} 1000\r\n3 microseconds per iteration', 0, 'tcl', 'some tests', '#EggTCL');
INSERT INTO `pastebin` VALUES (2510, 'leprechau', '2004-12-21 13:47:46', 'namespace eval ::dcctools {\r\n	namespace export chatInit\r\n	variable cText {}; variable servSock {}\r\n	variable dccSession; array set dccSession [list]\r\n\r\n	proc chatInit {client text} {\r\n		variable servSock; variable cText\r\n		if {![info exists ::my-ip]} {return}\r\n		set cText $text\r\n		foreach {a b c d} [split ${::my-ip} .] {}\r\n		set longip [format %u 0x[format %02X%02X%02X%02X $a $b $c $d]]\r\n		set servSock [socket -myaddr ${::my-ip} -server ::dcctools::chatAccept [set port [expr int(rand() * 3976) + 1024]]]\r\n		putserv "PRIVMSG $client :\\001DCC CHAT $client $longip $port\\001"\r\n	}\r\n\r\n	proc chatAccept {sock addr port} {\r\n		variable servSock; variable dccSession\r\n		putlog "Accepting DCC CHAT ($sock) connection from $addr:$port"\r\n		close $servSock; set dccSession($sock) [list $addr $port]\r\n		fconfigure $sock -buffering line\r\n		fileevent $sock writable [list ::dcctools::chatSend $sock]\r\n	}\r\n\r\n	proc chatSend {sock} {\r\n		variable dccSession; variable cText\r\n		fileevent $sock writable {}\r\n		puts $sock [join $cText \\n]\r\n		putlog "Terminating DCC CHAT ($sock) to [join $dccSession($sock) {:}]"; close $sock\r\n	}\r\n}\r\npackage provide dcctools 0.1', 0, 'tcl', 'some old code', '#EggTCL');
INSERT INTO `pastebin` VALUES (2511, 'sony', '2004-12-21 15:59:48', 'proc sb:xptlvl { input } {\r\n  global rs_exp\r\n  set exp [string map {"," ""} $input]\r\n  if {![sb:isnum $exp] || $exp == ""} { return "N/A" }\r\n  for {set lvl 1} {$lvl <= 300} {incr lvl} {\r\n    if {($exp >= [lindex $rs_exp $lvl]) && ($exp < [lindex $rs_exp [expr $lvl +1]])} { return "$lvl" }\r\n  }\r\n  return "N/A"\r\n}', 0, 'tcl', 'find lvl', '#EggTCL');
INSERT INTO `pastebin` VALUES (2512, 'kudejack', '2004-12-21 22:33:15', '# shoutcast.tcl v1.02 by domsen <domsen@domsen.org> (c)2oo3\r\n#\r\n# comments? bugs? ideas? requests? money? beer? \r\n# plz mail me or visit my homepage @ www.domsen.org\r\n# also check out www.uid-zero.de\r\n#\r\n# this script is for all the online radio admins out there. it announces serveral\r\n# stuff like the status of your radio, the current song, new listener peaks,\r\n# the current listeners and much much more to the channels you want.\r\n# the users can get infos by public and msg command, too, like the stream url,\r\n# stream stats, the last played songs, the current song, the dj... and much\r\n# more.\r\n# also the bot informs the users about the current dj, whenever he changes or\r\n# a certain command is triggered. the dj name doesnt need to be your nickname,\r\n# so you can also call yourself "goethe mc" even if your irc nickname is\r\n# [gay]michael. the good thing about this is: nobody knows your nickname, so \r\n# you wont get unwanted querys with wishes and greets. the dj can also change\r\n# his nickname and the wish- and greet-feature will still work fine.\r\n# only users with the flag +D can be djs, so make sure to give this flag to\r\n# your djs -> .chattr djnick +D\r\n# the script also changes the topic when your stream goes on or offline and\r\n# sends a public message, which is costumizeable.\r\n# it was tested with shoutcast 1.9.2 on debian linux.\r\n#\r\n# note: make sure youve got a good connection from your shellserver to your\r\n# streamserver - if its the same server then thats very very good. the bot\r\n# checks every minute if something happened, so if the connection is not fast\r\n# the bot will lag like hell or timeout. make sure to change your settings\r\n# for the eggdrop floodprotection.\r\n#\r\n# script history:\r\n# v1.02 - added the .listener command, corrected some typos ;>\r\n# v1.01 - fixed a string i forgot to replace\r\n# v1.0  - first public release\r\n#\r\n# what does what config option mean?\r\n#\r\n# radiochans - the channels the tcl is active in, "" for all, or "#chan1 #chan2"\r\n# streamip - the ip of your radio\r\n# streamport - the port of your radio\r\n# streampass - the admin pass of your radio\r\n#\r\n# scstatstrigger - the trigger for the radio stats\r\n# scplayingtrigger - shows the song the radio is playing now\r\n# sclistenertrigger - shows the current listenercount\r\n# scdjtrigger - shows the current dj name\r\n# scstreamtrigger - shows your stream url -> streamtext\r\n# scsetdjtrigger - sets the current dj name, this doesnt have to be your nickname.\r\n#                  your nick will be saved too and all wishes and greets will be\r\n#                  redirected to this nickname. only availavle for ppl with the +D\r\n#                  flag.\r\n# scwishtrigger - the command which the users can use if they wish a certain song\r\n# scgreettrigger - the command which users can use if the want to greet sb\r\n# sclastsongstrigger - the commands which users can use if they want to see the\r\n#                      songhistory\r\n# schelptrigger - shows the available commands\r\n#\r\n# announce - shall the bot announce any stuff? 1 for yes, 0 for no\r\n# urltopic - shall the bot change the topic everytime the radio goes on or off?\r\n# tellsongs - shall the bot post the songtitle to the channels everytime a\r\n#             new song starts?\r\n# tellusers - shall the bot post the number of current users to the channel\r\n#             everytime it changes or a new user maximum is reached?\r\n# tellbitrate - shall the bot announce bitrate changes?\r\n#\r\n# offlinetext - the reason the bot says when the radio goes offline\r\n# offlinetopic - the topic which is set when the radio goes offline\r\n#\r\n# onlinetext - the reason the bot says when the radio goes online\r\n# onlinetopic - the topic which is set when the radio goes online\r\n#\r\n# streamtext - the text with your stream infos\r\n# advertise - shall the bot advertist the advertisetext?\r\n# advertisetext - the text the bot will post once every 10 minutes.\r\n#\r\n# known bugs:\r\n# -numbers in the songhistory are killed, this is a xml sourcecode problem\r\n# -öäü are not shown correctly in the songtitles, because xml replaces each\r\n#  of them with the same chars, so i cant fix it :(\r\n#\r\n#\r\n#\r\n# config ##########################\r\n\r\nset radiochans ""\r\nset streamip "nightowl.dynu.ca"\r\nset streamport "8000"\r\nset streampass "2eppelin"\r\nset scstatstrigger "!radiostats"\r\nset scstreamtrigger "!stream"\r\nset scplayingtrigger "!song"\r\nset sclistenertrigger "!listeners"\r\nset scdjtrigger "!dj"\r\nset scsetdjtrigger "!setdj"\r\nset scwishtrigger "!wunsch"\r\nset scgreettrigger "!greet"\r\nset sclastsongstrigger "!lastsong"\r\nset schelptrigger "!radiohelp"\r\n\r\nset announce "1"\r\n\r\nset urltopic "0"\r\nset tellsongs "1"\r\nset tellusers "1"\r\nset tellbitrate "1"\r\n\r\nset advertise "0"\r\n\r\nset offlinetext "Radio went offline. DJ ran out of files *g"\r\n# set offlinetopic "11''\\%0,11\\%,12,11''\\%11,12\\%,2,12''\\%12,2\\%,1,2''\\%,11,12   .::Future is here::.  1,2\\%,12,2''\\%2,12\\%,11,12''\\%12,11\\%,0,11''\\%11\\%"\r\n\r\nset onlinetext "write !radiohelp for help"\r\n# set onlinetopic ""\r\n\r\nset streamtext "tune in @ http://$streamip:$streamport/listen.pls"\r\n\r\nset advertisetext ".:NiGHtOwL RaDiO:. @ http://$streamip:$streamport/listen.pls"\r\n\r\n# end of config #####################\r\n\r\nbind pub - $scstatstrigger  pub_scstat\r\nbind msg - $scstatstrigger  msg_scstat\r\n\r\nbind pub - $scplayingtrigger  pub_playing\r\nbind msg - $scplayingtrigger  msg_playing\r\n\r\nbind pub - $scdjtrigger  pub_dj\r\nbind msg - $scdjtrigger  msg_dj\r\n\r\nbind pub D $scsetdjtrigger  pub_setdj\r\nbind msg D $scsetdjtrigger  msg_setdj\r\n\r\nbind pub - $scwishtrigger  pub_wish\r\nbind msg - $scwishtrigger  msg_wish\r\n\r\nbind pub - $scgreettrigger  pub_greet\r\nbind msg - $scgreettrigger  msg_greet\r\n\r\nbind pub - $scstreamtrigger pub_stream\r\nbind msg - $scstreamtrigger msg_stream\r\n\r\nbind pub - $sclastsongstrigger pub_lastsongs\r\nbind msg - $sclastsongstrigger msg_lastsongs\r\n\r\nbind pub - $sclistenertrigger pub_listener\r\nbind msg - $sclistenertrigger msg_listener\r\n\r\nbind pub - $schelptrigger pub_help\r\nbind msg - $schelptrigger msg_help\r\n\r\nbind time - "* * * * *" isonline\r\nbind time - "?0 * * * *" advertise\r\nbind nick D * djnickchange\r\n\r\nproc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }\r\n\r\nproc poststuff { mode text } {\r\nglobal radiochans\r\nforeach chan [channels] {\r\nif {$radiochans == "" } { putserv "$mode $chan :$text" }\r\nif {$radiochans != "" } {\r\nif {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} {putserv "$mode $chan :$text"}\r\n}}}\r\n\r\n\r\nproc schelp { target } {\r\nglobal scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger\r\nputserv "notice $target :the following commands are available:"\r\nputserv "notice $target :$scstatstrigger - $scstreamtrigger - $scplayingtrigger - $scdjtrigger - $sclastsongstrigger - $scwishtrigger - $scgreettrigger - $sclistenertrigger"\r\nputserv "notice $target :.:NiGHtOwL RaDiO:. loves you :)"\r\n}\r\n\r\nproc pub_help {nick uhost hand chan arg} {\r\nglobal radiochans\r\nif {$radiochans == "" } { schelp $nick }\r\nif {$radiochans != "" } {\r\nif {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick}\r\n}}\r\n\r\nproc advertise { nick uhost hand chan arg } {\r\nglobal advertisetext advertise\r\nif {$advertise == "1" } { poststuff privmsg $advertisetext }\r\n}\r\n\r\n\r\nproc setdj {nickname djnickname } {\r\nif {$djnickname == "" } { set djnickname $nickname }\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: new dj: $djnickname ($nickname)"\r\nset temp [open "dj" w+]\r\nputs $temp $djnickname\r\nclose $temp\r\nset temp [open "djnick" w+]\r\nputs $temp $nickname\r\nclose $temp\r\nputserv "privmsg $nickname :your are now dj of this radio"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { poststuff privmsg "$djnickname is now rocking the turntables, enjoy." } else {\r\nputserv "privmsg $nickname :this has not been announced because the radio is currentlfy offline." }\r\n}}\r\n\r\n\r\nproc listener { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target requested listener count"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset repl [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]\r\nset curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]\r\nset maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]\r\nset avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]\r\n}}\r\nclose $sock\r\nputserv "notice $target :there are currently $repl listeners\r\n#, the listener maximum is $maxl, our user peak was at $curhigh listeners, the listening time average is $avgtime"\r\n}}\r\n\r\nproc msg_listener { nick uhost hand arg } { global radiochans; listener $nick }\r\nproc pub_listener { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { listener $nick  }}\r\n\r\nproc wish { nick arg } {\r\nif {$arg == ""} { putserv "notice $nick :you forgot to add your wish"; return 0}\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $nick wants to hear: $arg"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { \r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nputserv "privmsg $djnick :(WISH) - $nick - $arg"\r\n} else {\r\nputserv "notice $nick :sorry radio is currently offline" }\r\n}}\r\n\r\n\r\nproc msg_wish { nick uhost hand arg } { global radiochans; wish $nick $arg }\r\nproc pub_wish { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}\r\n\r\n\r\n\r\n\r\nproc sclastsongs { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target requested songhistory"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset songs [string range $bl [string first "<TITLE>" $bl] [expr [string last "</TITLE>" $bl] + 7]]\r\nregsub -all "<" $songs "<" songs\r\nregsub -all ">" $songs ">" songs\r\nregsub -all "&" $songs "+" songs\r\nregsub -all """ $songs "\\"" songs\r\nregsub -all "''" $songs "''" songs\r\nregsub -all "ÿ" $songs "" songs\r\nregsub -all "<TITLE>" $songs "(" songs\r\nregsub -all "</TITLE>" $songs ")" songs\r\nregsub -all "<SONG>" $songs "" songs\r\nregsub -all "</SONG>" $songs " - " songs\r\nregsub -all "<PLAYEDAT>" $songs "" songs\r\nregsub -all "</PLAYEDAT>" $songs "" songs\r\nregsub -all {\\d} $songs "" songs\r\n}}\r\nputserv "notice $target :$songs"\r\n}}\r\n\r\n\r\nproc msg_lastsongs { nick uhost hand arg } { global radiochans; sclastsongs $nick }\r\nproc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}\r\n\r\n\r\n\r\nproc scstream { target } {\r\nglobal streamip streamport streamtext\r\nputlog "shoutcast: streaminfo requested by $target"\r\nputserv "notice $target :$streamtext"\r\n}\r\n\r\nproc msg_stream { nick uhost hand arg } { global radiochans; scstream $nick }\r\nproc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}\r\n\r\nproc scgreet { nick arg } {\r\nif {$arg == ""} { putserv "notice $nick :you forgot to add your greetmessage"; return 0}\r\nglobal dj streamip streamport streampass\r\nputlog "shoutcast: $nick greets fly out to: $arg"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { \r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nputserv "privmsg $djnick :(GREET) - $nick - $arg"\r\n} else {\r\nputserv "notice $nick :sorry radio is currently offline" }\r\n}}\r\n\r\n\r\nproc msg_greet { nick uhost hand arg } { global radiochans; scgreet $nick $arg }\r\nproc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}\r\n\r\nproc msg_setdj { nick uhost hand arg } { global radiochans; setdj $nick $arg }\r\nproc pub_setdj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { setdj $nick $arg }}\r\n\r\n\r\n\r\nproc djnickchange { oldnick uhost hand chan newnick } {\r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nif {$oldnick == $djnick} {\r\nputlog "shoutcast: dj nickchange $oldnick -> $newnick"\r\nset temp [open "djnick" w+]\r\nputs $temp $newnick\r\nclose $temp\r\n}}\r\n\r\n\r\n\r\n\r\n\r\nproc dj { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for dj info" \r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif {$streamstatus == 1} {\r\nif {[file exists dj]} {\r\nset temp [open "dj" r]\r\nset dj [gets $temp]\r\nclose $temp\r\nputserv "notice $target :$dj is at the turntables!"\r\n} else { putserv "notice $target :sorry, no dj name available" }\r\n} else {\r\nputserv "notice $target :sorry radio is currently offline"\r\n}\r\nclose $sock\r\n}}\r\n\r\n\r\n\r\nproc msg_dj { nick uhost hand arg } { global radiochans; dj $nick"}\r\nproc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick  }}\r\n\r\n\r\n\r\nproc scstat {target} {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for serverstats"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\nset repl [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]\r\nset curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]\r\nset currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]\r\nset surl [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]\r\nset maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]\r\nset bitrate [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]\r\nset stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]\r\nset sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]\r\nif {$sgenre != ""} {set sgenre " ($sgenre)"}\r\nset avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]\r\nset irc [string range $bl [shrink + 5 "<IRC>" 0 $bl] [shrink - 1 "</IRC>" 0 $bl]]\r\nset icq [string range $bl [shrink + 5 "<ICQ>" 0 $bl] [shrink - 1 "</ICQ>" 0 $bl]]\r\nif {$icq == 0} { set icq "N/A" }\r\nset aim [string range $bl [shrink + 5 "<AIM>" 0 $bl] [shrink - 1 "</AIM>" 0 $bl]]\r\nset webhits [string range $bl [shrink + 9 "<WEBHITS>" 0 $bl] [shrink - 1 "</WEBHITS>" 0 $bl]]\r\nset streamhits [string range $bl [shrink + 12 "<STREAMHITS>" 0 $bl] [shrink - 1 "</STREAMHITS>" 0 $bl]]\r\nset version [string range $bl [shrink + 9 "<VERSION>" 0 $bl] [shrink - 1 "</VERSION>" 0 $bl]]\r\nif {$streamstatus == 1} {\r\nif {[file exists dj]} {\r\nset temp [open "dj" r]\r\nset dj [gets $temp]\r\nclose $temp\r\n} else { set dj "none" }\r\nputserv "notice $target :$stitle$sgenre is online, running shoutcast $version and streaming at $bitrate kbps,  your dj is $dj. please visit $surl"\r\n} else {\r\nputserv "notice $target :$stitle$sgenre is currenty offline, running shoutcast $version and streaming at $bitrate kbps, check out $surl" }\r\nputserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners."\r\nputserv "notice $target :the average user is listening $avgtime seconds, our stream had $webhits webhits and $streamhits streamhits."\r\nputserv "notice $target :you can contact the team by irc on $irc, via aim at $aim and with icq by the uin $icq."\r\n}}\r\nclose $sock\r\n}}\r\n\r\n\r\nproc msg_scstat { nick uhost hand arg } { global radiochans; scstat $nick}\r\nproc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick  }}\r\n\r\n\r\nproc playing {target} {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for current song"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\nset songtitle [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]\r\nset songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]\r\nif {$songurl != ""} { set songurl " ($songurl)"}\r\nregsub -all "<" $songtitle "<" songtitle\r\nregsub -all ">" $songtitle ">" songtitle\r\nregsub -all "&" $songtitle "+" songtitle  \r\nregsub -all """ $songtitle "\\"" songtitle\r\nregsub -all "''" $songtitle "''" songtitle\r\nregsub -all "ÿ" $songtitle "" songtitle\r\nif {$streamstatus == 1} {\r\nputserv "notice $target :$songtitle"\r\n} else {\r\nputserv "notice $target :server is currently offline, sorry"\r\n}}}\r\nclose $sock\r\n}}\r\n\r\nproc msg_playing { nick uhost hand arg } { global radiochans; playing $nick}\r\nproc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick  }}\r\n\r\nproc isonline { nick uhost hand chan arg } {\r\nglobal radiochans announce tellusers tellsongs tellbitrate urltopic \r\nglobal offlinetext offlinetopic onlinetext onlinetopic\r\nglobal streamip streampass streamport\r\n\r\nif {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {\r\nset isonlinefile "isonline"\r\nset oldisonline "isonline: 0"\r\nset oldcurlist "curlist: 0"\r\nset oldcurhigh "curhigh: 0"\r\nset oldsong "cursong: 0"\r\nset oldbitrate "bitrate: 0"\r\nif {[file exists $isonlinefile]} {\r\nputlog "shoutcast: checking if stream is online"\r\nset temp [open "isonline" r]\r\nwhile {[eof $temp] != 1} {\r\nset zeile [gets $temp]\r\nif {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }\r\nif {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }\r\nif {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }\r\nif {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }\r\nif {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }\r\n}\r\nclose $temp\r\n}\r\n\r\n\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0} else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus "isonline: [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]"\r\nset repl "curlist: [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]"\r\nset curhigh "curhigh: [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]"\r\nset currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]\r\nset surl "serverurl: [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]"\r\nset cursong "cursong: [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]"\r\nset songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]\r\nset bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"\r\nset stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]\r\nset sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]\r\n}}\r\nclose $sock\r\n}\r\n\r\nset temp [open "isonline" w+]\r\nputs $temp "$streamstatus\\n$repl\\n$curhigh\\n$cursong\\n$bitrate"\r\nclose $temp\r\nif {$announce == 1 } {\r\nif {$streamstatus == "isonline: 0" && $oldisonline == "isonline: 1"} {\r\npoststuff privmsg $offlinetext\r\nif {$urltopic == 1} { poststuff topic $offlinetopic }\r\n}\r\nif {$streamstatus == "isonline: 1" && $oldisonline == "isonline: 0" } {\r\nif {$sgenre != ""} {\r\nset sgenre " ($sgenre)"\r\n}\r\npoststuff privmsg "$stitle$sgenre now online @ http://[lindex $surl 1]/listen.pls with [lindex $bitrate 1]kbits $onlinetext"\r\nif {$urltopic == 1} { poststuff topic "$stitle @ http://[lindex $surl 1]/listen.pls streaming at [lindex $bitrate 1]kbits $onlinetopic" }\r\n}}\r\nif {($tellusers == 1) && ($streamstatus == "isonline: 1") && ($oldcurhigh != "curhigh: 0") } {\r\nif {$oldcurhigh != $curhigh} {\r\npoststuff privmsg "new listener peak: [lindex $curhigh 1]"\r\n}\r\nif {$oldcurlist != $repl} {\r\npoststuff privmsg "there are currently [lindex $repl 1] ($currentl) people listening"\r\n}}\r\nif {($tellsongs == 1) && ($oldsong != $cursong) && ($streamstatus == "isonline: 1") } {\r\nif {$songurl != ""} { set songurl " ($songurl)"}\r\nregsub -all "<" $cursong "<" cursong\r\nregsub -all ">" $cursong ">" cursong\r\nregsub -all "&" $cursong "+" cursong  \r\nregsub -all """ $cursong "\\"" cursong\r\nregsub -all "''" $cursong "''" cursong\r\nregsub -all "ÿ" $cursong "" cursong\r\n#poststuff privmsg "$stitle spielt [lrange $cursong 1 [llength $cursong]]$songurl"\r\npoststuff privmsg "$stitle spielt:  [lrange $cursong 1 [llength $cursong]]"\r\n}\r\n\r\nif {($tellbitrate == 1) && ($oldbitrate != $bitrate) && ($streamstatus == "isonline: 1") && ($oldbitrate != "bitrate: 0")} {\r\npoststuff privmsg "bitrate switched to [lindex $bitrate 1]kbps"\r\n}}}\r\n\r\nputlog "*** shoutcast.tcl v1.02 by domsen <domsen@domsen.org> succesfully loaded. turn it up baby."', 2232, 'none', 'johorbahruteamWork', 'none');
INSERT INTO `pastebin` VALUES (2513, 'Robb', '2004-12-22 14:06:30', 'entry .entry\r\nbutton .but -font Verdana -text "Search" -command "gbrank Robbz"\r\nproc gbrank {text} {\r\nif {[llength [split $text ""]]==0} {label .error -text "please type an ID!" ;pack .error ;return}\r\nset sock [socket www.gunbound.net 80]\r\nfconfigure $sock -buffering line\r\nputs $sock "GET /rank/rank_s.asp?search_id=$text HTTP/1.1"\r\nputs $sock "Host: www.gunbound.net"\r\nputs $sock "Accept: */*"\r\nputs $sock "Referer: www.gunbound.net/rank/rank_s.asp?search_id="\r\nputs $sock "User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)"\r\nputs $sock "Pragma: no-cache"\r\nputs $sock "Cache-Control: no-cache"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\n\r\nflush $sock\r\n\r\nwhile {![eof $sock]} {\r\ngets $sock line\r\nregsub -all {\\t} $line "" line\r\nif {[regexp -all {<td colspan=5 align="center"><b>No data found for the ID</b></td>} $line]} {\r\nset noid 1\r\n}\r\nif {[regexp -all {<td width="61" align="center">(.*?)} $line]} {\r\nregsub -all {(<.+?>)} $line "" line\r\nset gbinfo(rank) "[string trimleft $line [format %c 32]]"\r\n}\r\nif {[regexp -all {<td width="47" align="center"><img src="../images/(.*?)"} $line _ level]} {\r\nset gbinfo(level) "[string trimleft $level [format %c 32]]"\r\n}\r\nif {[regexp -all {<td width="70" align="center">(.*?)</td>} $line _ guild]} {\r\nset gbinfo(guild) "[string trimleft $guild [format %c 32]]"\r\n}\r\nif {[regexp -all {<td width="100" align="center">(.*?)</td>} $line _ id]} {\r\nset gbinfo(id) "[string trimleft $id [format %c 32]]"\r\n}\r\nif {[regexp -all {<td width="186" align="center" height="20">(.*?)</td>} $line _ gp]} {\r\nset gbinfo(gp) "[string trimleft $gp [format %c 32]]"\r\n}\r\n}\r\nclose $sock\r\n\r\nif {[info exists noid]} {puts "No data found for the ID";return}\r\n\r\nif {$gbinfo(guild) == "--"} { set gbinfo(guild) "NONE" } \r\n\r\nset gbinfo(level) [string map {"rank_0.gif" "Red Wand" "rank_-1.gif" "Diamond Wand" "rank_-2.gif" "Blue Dragon" "rank_-3.gif" "Red Dragon" "rank_-4.gif" "Golden Double Sided Axe" "rank_0.gif" "Red Wand" "rank_1.gif" "Blue Wand" "rank_2.gif" "Purple Wand" "rank_3.gif" "Golden Double Sided Axe+" "rank_4.gif" "Golden Double Sided Axe" "rank_5.gif" "Silver Double Sided Axe+" "rank_6.gif" "Silver Double Sided Axe" "rank_7.gif" "Double Sided Axe+" "rank_8.gif" "Double Sided Axe" "rank_9.gif" "Double Golden Axe" "rank_10.gif" "Golden Axe" "rank_11.gif" "Double Silver Axe" "rank_12.gif" "Silver Axe" "rank_13.gif" "Double Metal Axe" "rank_14.gif" "Metal Axe" "rank_15.gif" "Double Stone Hammer" "rank_16.gif" "Stone Hammer" "rank_17.gif" "Double Wood Hammer" "rank_18.gif" "Wood Hammer" "rank_19.gif" "Chicken"} $gbinfo(level)]\r\nlabel .out -font Verdana -text "ID: $gbinfo(id) Rank: $gbinfo(rank) Level: $gbinfo(level) Guild: $gbinfo(guild) GP: $gbinfo(gp)"\r\npack .out\r\n}\r\npack .entry\r\npack .but', 0, 'none', 'none', 'none');
INSERT INTO `pastebin` VALUES (2515, 't0mb0y', '2004-12-22 16:00:50', 'su $username -c "{ crontab -l | grep -v "eggdrop"\r\n    echo "## check for eggdrop running"\r\n    echo "*/5 * * * *     $eggdroppath/scripts/botchk >/dev/null 2>&1"\r\n} | crontab - > /dev/null"\r\n', 0, 'bash', 'none', 'none');
INSERT INTO `pastebin` VALUES (2516, 'kudejack', '2004-12-23 13:45:21', '# shoutcast.tcl v1.02 by domsen <domsen@domsen.org> (c)2oo3\r\n#\r\n# comments? bugs? ideas? requests? money? beer? \r\n# plz mail me or visit my homepage @ www.domsen.org\r\n# also check out www.uid-zero.de\r\n#\r\n# this script is for all the online radio admins out there. it announces serveral\r\n# stuff like the status of your radio, the current song, new listener peaks,\r\n# the current listeners and much much more to the channels you want.\r\n# the users can get infos by public and msg command, too, like the stream url,\r\n# stream stats, the last played songs, the current song, the dj... and much\r\n# more.\r\n# also the bot informs the users about the current dj, whenever he changes or\r\n# a certain command is triggered. the dj name doesnt need to be your nickname,\r\n# so you can also call yourself "goethe mc" even if your irc nickname is\r\n# [gay]michael. the good thing about this is: nobody knows your nickname, so \r\n# you wont get unwanted querys with wishes and greets. the dj can also change\r\n# his nickname and the wish- and greet-feature will still work fine.\r\n# only users with the flag +D can be djs, so make sure to give this flag to\r\n# your djs -> .chattr djnick +D\r\n# the script also changes the topic when your stream goes on or offline and\r\n# sends a public message, which is costumizeable.\r\n# it was tested with shoutcast 1.9.2 on debian linux.\r\n#\r\n# note: make sure youve got a good connection from your shellserver to your\r\n# streamserver - if its the same server then thats very very good. the bot\r\n# checks every minute if something happened, so if the connection is not fast\r\n# the bot will lag like hell or timeout. make sure to change your settings\r\n# for the eggdrop floodprotection.\r\n#\r\n# script history:\r\n# v1.02 - added the .listener command, corrected some typos ;>\r\n# v1.01 - fixed a string i forgot to replace\r\n# v1.0  - first public release\r\n#\r\n# what does what config option mean?\r\n#\r\n# radiochans - the channels the tcl is active in, "" for all, or "#chan1 #chan2"\r\n# streamip - the ip of your radio\r\n# streamport - the port of your radio\r\n# streampass - the admin pass of your radio\r\n#\r\n# scstatstrigger - the trigger for the radio stats\r\n# scplayingtrigger - shows the song the radio is playing now\r\n# sclistenertrigger - shows the current listenercount\r\n# scdjtrigger - shows the current dj name\r\n# scstreamtrigger - shows your stream url -> streamtext\r\n# scsetdjtrigger - sets the current dj name, this doesnt have to be your nickname.\r\n#                  your nick will be saved too and all wishes and greets will be\r\n#                  redirected to this nickname. only availavle for ppl with the +D\r\n#                  flag.\r\n# scwishtrigger - the command which the users can use if they wish a certain song\r\n# scgreettrigger - the command which users can use if the want to greet sb\r\n# sclastsongstrigger - the commands which users can use if they want to see the\r\n#                      songhistory\r\n# schelptrigger - shows the available commands\r\n#\r\n# announce - shall the bot announce any stuff? 1 for yes, 0 for no\r\n# urltopic - shall the bot change the topic everytime the radio goes on or off?\r\n# tellsongs - shall the bot post the songtitle to the channels everytime a\r\n#             new song starts?\r\n# tellusers - shall the bot post the number of current users to the channel\r\n#             everytime it changes or a new user maximum is reached?\r\n# tellbitrate - shall the bot announce bitrate changes?\r\n#\r\n# offlinetext - the reason the bot says when the radio goes offline\r\n# offlinetopic - the topic which is set when the radio goes offline\r\n#\r\n# onlinetext - the reason the bot says when the radio goes online\r\n# onlinetopic - the topic which is set when the radio goes online\r\n#\r\n# streamtext - the text with your stream infos\r\n# advertise - shall the bot advertist the advertisetext?\r\n# advertisetext - the text the bot will post once every 10 minutes.\r\n#\r\n# known bugs:\r\n# -numbers in the songhistory are killed, this is a xml sourcecode problem\r\n# -öäü are not shown correctly in the songtitles, because xml replaces each\r\n#  of them with the same chars, so i cant fix it :(\r\n#\r\n#\r\n#\r\n# config ##########################\r\n\r\nset radiochans ""\r\nset streamip "nightowl.dynu.ca"\r\nset streamport "8000"\r\nset streampass "2eppelin"\r\nset scstatstrigger "!radiostats"\r\nset scstreamtrigger "!stream"\r\nset scplayingtrigger "!song"\r\nset sclistenertrigger "!listeners"\r\nset scdjtrigger "!dj"\r\nset scsetdjtrigger "!setdj"\r\nset scwishtrigger "!wunsch"\r\nset scgreettrigger "!greet"\r\nset sclastsongstrigger "!lastsong"\r\nset schelptrigger "!radiohelp"\r\n\r\nset announce "1"\r\n\r\nset urltopic "0"\r\nset tellsongs "1"\r\nset tellusers "1"\r\nset tellbitrate "1"\r\n\r\nset advertise "0"\r\n\r\nset offlinetext "Radio went offline. DJ ran out of files *g"\r\n# set offlinetopic "11''\\%0,11\\%,12,11''\\%11,12\\%,2,12''\\%12,2\\%,1,2''\\%,11,12   .::Future is here::.  1,2\\%,12,2''\\%2,12\\%,11,12''\\%12,11\\%,0,11''\\%11\\%"\r\n\r\nset onlinetext "write !radiohelp for help"\r\n# set onlinetopic ""\r\n\r\nset streamtext "tune in @ http://$streamip:$streamport/listen.pls"\r\n\r\nset advertisetext ".:NiGHtOwL RaDiO:. @ http://$streamip:$streamport/listen.pls"\r\n\r\n# end of config #####################\r\n\r\nbind pub - $scstatstrigger  pub_scstat\r\nbind msg - $scstatstrigger  msg_scstat\r\n\r\nbind pub - $scplayingtrigger  pub_playing\r\nbind msg - $scplayingtrigger  msg_playing\r\n\r\nbind pub - $scdjtrigger  pub_dj\r\nbind msg - $scdjtrigger  msg_dj\r\n\r\nbind pub D $scsetdjtrigger  pub_setdj\r\nbind msg D $scsetdjtrigger  msg_setdj\r\n\r\nbind pub - $scwishtrigger  pub_wish\r\nbind msg - $scwishtrigger  msg_wish\r\n\r\nbind pub - $scgreettrigger  pub_greet\r\nbind msg - $scgreettrigger  msg_greet\r\n\r\nbind pub - $scstreamtrigger pub_stream\r\nbind msg - $scstreamtrigger msg_stream\r\n\r\nbind pub - $sclastsongstrigger pub_lastsongs\r\nbind msg - $sclastsongstrigger msg_lastsongs\r\n\r\nbind pub - $sclistenertrigger pub_listener\r\nbind msg - $sclistenertrigger msg_listener\r\n\r\nbind pub - $schelptrigger pub_help\r\nbind msg - $schelptrigger msg_help\r\n\r\nbind time - "* * * * *" isonline\r\nbind time - "?0 * * * *" advertise\r\nbind nick D * djnickchange\r\n\r\nproc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }\r\n\r\nproc poststuff { mode text } {\r\nglobal radiochans\r\nforeach chan [channels] {\r\nif {$radiochans == "" } { putserv "$mode $chan :$text" }\r\nif {$radiochans != "" } {\r\nif {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} {putserv "$mode $chan :$text"}\r\n}}}\r\n\r\n\r\nproc schelp { target } {\r\nglobal scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger\r\nputserv "notice $target :the following commands are available:"\r\nputserv "notice $target :$scstatstrigger - $scstreamtrigger - $scplayingtrigger - $scdjtrigger - $sclastsongstrigger - $scwishtrigger - $scgreettrigger - $sclistenertrigger"\r\nputserv "notice $target :.:NiGHtOwL RaDiO:. loves you :)"\r\n}\r\n\r\nproc pub_help {nick uhost hand chan arg} {\r\nglobal radiochans\r\nif {$radiochans == "" } { schelp $nick }\r\nif {$radiochans != "" } {\r\nif {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick}\r\n}}\r\n\r\nproc advertise { nick uhost hand chan arg } {\r\nglobal advertisetext advertise\r\nif {$advertise == "1" } { poststuff privmsg $advertisetext }\r\n}\r\n\r\n\r\nproc setdj {nickname djnickname } {\r\nif {$djnickname == "" } { set djnickname $nickname }\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: new dj: $djnickname ($nickname)"\r\nset temp [open "dj" w+]\r\nputs $temp $djnickname\r\nclose $temp\r\nset temp [open "djnick" w+]\r\nputs $temp $nickname\r\nclose $temp\r\nputserv "privmsg $nickname :your are now dj of this radio"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { poststuff privmsg "$djnickname is now rocking the turntables, enjoy." } else {\r\nputserv "privmsg $nickname :this has not been announced because the radio is currentlfy offline." }\r\n}}\r\n\r\n\r\nproc listener { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target requested listener count"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset repl [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]\r\nset curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]\r\nset maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]\r\nset avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]\r\n}}\r\nclose $sock\r\nputserv "notice $target :there are currently $repl listeners\r\n#, the listener maximum is $maxl, our user peak was at $curhigh listeners, the listening time average is $avgtime"\r\n}}\r\n\r\nproc msg_listener { nick uhost hand arg } { global radiochans; listener $nick }\r\nproc pub_listener { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { listener $nick  }}\r\n\r\nproc wish { nick arg } {\r\nif {$arg == ""} { putserv "notice $nick :you forgot to add your wish"; return 0}\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $nick wants to hear: $arg"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { \r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nputserv "privmsg $djnick :(WISH) - $nick - $arg"\r\n} else {\r\nputserv "notice $nick :sorry radio is currently offline" }\r\n}}\r\n\r\n\r\nproc msg_wish { nick uhost hand arg } { global radiochans; wish $nick $arg }\r\nproc pub_wish { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}\r\n\r\n\r\n\r\n\r\nproc sclastsongs { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target requested songhistory"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset songs [string range $bl [string first "<TITLE>" $bl] [expr [string last "</TITLE>" $bl] + 7]]\r\nregsub -all "<" $songs "<" songs\r\nregsub -all ">" $songs ">" songs\r\nregsub -all "&" $songs "+" songs\r\nregsub -all """ $songs "\\"" songs\r\nregsub -all "''" $songs "''" songs\r\nregsub -all "ÿ" $songs "" songs\r\nregsub -all "<TITLE>" $songs "(" songs\r\nregsub -all "</TITLE>" $songs ")" songs\r\nregsub -all "<SONG>" $songs "" songs\r\nregsub -all "</SONG>" $songs " - " songs\r\nregsub -all "<PLAYEDAT>" $songs "" songs\r\nregsub -all "</PLAYEDAT>" $songs "" songs\r\nregsub -all {\\d} $songs "" songs\r\n}}\r\nputserv "notice $target :$songs"\r\n}}\r\n\r\n\r\nproc msg_lastsongs { nick uhost hand arg } { global radiochans; sclastsongs $nick }\r\nproc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}\r\n\r\n\r\n\r\nproc scstream { target } {\r\nglobal streamip streamport streamtext\r\nputlog "shoutcast: streaminfo requested by $target"\r\nputserv "notice $target :$streamtext"\r\n}\r\n\r\nproc msg_stream { nick uhost hand arg } { global radiochans; scstream $nick }\r\nproc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}\r\n\r\nproc scgreet { nick arg } {\r\nif {$arg == ""} { putserv "notice $nick :you forgot to add your greetmessage"; return 0}\r\nglobal dj streamip streamport streampass\r\nputlog "shoutcast: $nick greets fly out to: $arg"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif { $streamstatus == "1" } { \r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nputserv "privmsg $djnick :(GREET) - $nick - $arg"\r\n} else {\r\nputserv "notice $nick :sorry radio is currently offline" }\r\n}}\r\n\r\n\r\nproc msg_greet { nick uhost hand arg } { global radiochans; scgreet $nick $arg }\r\nproc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}\r\n\r\nproc msg_setdj { nick uhost hand arg } { global radiochans; setdj $nick $arg }\r\nproc pub_setdj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { setdj $nick $arg }}\r\n\r\n\r\n\r\nproc djnickchange { oldnick uhost hand chan newnick } {\r\nset temp [open "djnick" r]\r\nset djnick [gets $temp]\r\nclose $temp\r\nif {$oldnick == $djnick} {\r\nputlog "shoutcast: dj nickchange $oldnick -> $newnick"\r\nset temp [open "djnick" w+]\r\nputs $temp $newnick\r\nclose $temp\r\n}}\r\n\r\n\r\n\r\n\r\n\r\nproc dj { target } {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for dj info" \r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\n}}\r\nif {$streamstatus == 1} {\r\nif {[file exists dj]} {\r\nset temp [open "dj" r]\r\nset dj [gets $temp]\r\nclose $temp\r\nputserv "notice $target :$dj is at the turntables!"\r\n} else { putserv "notice $target :sorry, no dj name available" }\r\n} else {\r\nputserv "notice $target :sorry radio is currently offline"\r\n}\r\nclose $sock\r\n}}\r\n\r\n\r\n\r\nproc msg_dj { nick uhost hand arg } { global radiochans; dj $nick"}\r\nproc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick  }}\r\n\r\n\r\n\r\nproc scstat {target} {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for serverstats"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\nset repl [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]\r\nset curhigh [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]\r\nset currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]\r\nset surl [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]\r\nset maxl [string range $bl [shrink + 14 "<MAXLISTENERS>" 0 $bl] [shrink - 1 "</MAXLISTENERS>" 0 $bl]]\r\nset bitrate [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]\r\nset stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]\r\nset sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]\r\nif {$sgenre != ""} {set sgenre " ($sgenre)"}\r\nset avgtime [string range $bl [shrink + 13 "<AVERAGETIME>" 0 $bl] [shrink - 1 "</AVERAGETIME>" 0 $bl]]\r\nset irc [string range $bl [shrink + 5 "<IRC>" 0 $bl] [shrink - 1 "</IRC>" 0 $bl]]\r\nset icq [string range $bl [shrink + 5 "<ICQ>" 0 $bl] [shrink - 1 "</ICQ>" 0 $bl]]\r\nif {$icq == 0} { set icq "N/A" }\r\nset aim [string range $bl [shrink + 5 "<AIM>" 0 $bl] [shrink - 1 "</AIM>" 0 $bl]]\r\nset webhits [string range $bl [shrink + 9 "<WEBHITS>" 0 $bl] [shrink - 1 "</WEBHITS>" 0 $bl]]\r\nset streamhits [string range $bl [shrink + 12 "<STREAMHITS>" 0 $bl] [shrink - 1 "</STREAMHITS>" 0 $bl]]\r\nset version [string range $bl [shrink + 9 "<VERSION>" 0 $bl] [shrink - 1 "</VERSION>" 0 $bl]]\r\nif {$streamstatus == 1} {\r\nif {[file exists dj]} {\r\nset temp [open "dj" r]\r\nset dj [gets $temp]\r\nclose $temp\r\n} else { set dj "none" }\r\nputserv "notice $target :$stitle$sgenre is online, running shoutcast $version and streaming at $bitrate kbps,  your dj is $dj. please visit $surl"\r\n} else {\r\nputserv "notice $target :$stitle$sgenre is currenty offline, running shoutcast $version and streaming at $bitrate kbps, check out $surl" }\r\nputserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners."\r\nputserv "notice $target :the average user is listening $avgtime seconds, our stream had $webhits webhits and $streamhits streamhits."\r\nputserv "notice $target :you can contact the team by irc on $irc, via aim at $aim and with icq by the uin $icq."\r\n}}\r\nclose $sock\r\n}}\r\n\r\n\r\nproc msg_scstat { nick uhost hand arg } { global radiochans; scstat $nick}\r\nproc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick  }}\r\n\r\n\r\nproc playing {target} {\r\nglobal streamip streamport streampass\r\nputlog "shoutcast: $target asked for current song"\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0 } else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]\r\nset songtitle [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]\r\nset songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]\r\nif {$songurl != ""} { set songurl " ($songurl)"}\r\nregsub -all "<" $songtitle "<" songtitle\r\nregsub -all ">" $songtitle ">" songtitle\r\nregsub -all "&" $songtitle "+" songtitle  \r\nregsub -all """ $songtitle "\\"" songtitle\r\nregsub -all "''" $songtitle "''" songtitle\r\nregsub -all "ÿ" $songtitle "" songtitle\r\nif {$streamstatus == 1} {\r\nputserv "notice $target :$songtitle"\r\n} else {\r\nputserv "notice $target :server is currently offline, sorry"\r\n}}}\r\nclose $sock\r\n}}\r\n\r\nproc msg_playing { nick uhost hand arg } { global radiochans; playing $nick}\r\nproc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick  }}\r\n\r\nproc isonline { nick uhost hand chan arg } {\r\nglobal radiochans announce tellusers tellsongs tellbitrate urltopic \r\nglobal offlinetext offlinetopic onlinetext onlinetopic\r\nglobal streamip streampass streamport\r\n\r\nif {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {\r\nset isonlinefile "isonline"\r\nset oldisonline "isonline: 0"\r\nset oldcurlist "curlist: 0"\r\nset oldcurhigh "curhigh: 0"\r\nset oldsong "cursong: 0"\r\nset oldbitrate "bitrate: 0"\r\nif {[file exists $isonlinefile]} {\r\nputlog "shoutcast: checking if stream is online"\r\nset temp [open "isonline" r]\r\nwhile {[eof $temp] != 1} {\r\nset zeile [gets $temp]\r\nif {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }\r\nif {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }\r\nif {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }\r\nif {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }\r\nif {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }\r\n}\r\nclose $temp\r\n}\r\n\r\n\r\nif {[catch {set sock [socket $streamip $streamport] } sockerror]} {\r\nputlog "error: $sockerror"\r\nreturn 0} else {\r\nputs $sock "GET /admin.cgi?pass=$streampass&mode=viewxml&page=0 HTTP/1.0"\r\nputs $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"\r\nputs $sock "Host: $streamip"\r\nputs $sock "Connection: close"\r\nputs $sock ""\r\nflush $sock\r\nwhile {[eof $sock] != 1} {\r\nset bl [gets $sock]\r\nif { [string first "standalone" $bl] != -1 } {\r\nset streamstatus "isonline: [string range $bl [shrink + 14 "<STREAMSTATUS>" 0 $bl] [shrink - 1 "</STREAMSTATUS>" 0 $bl]]"\r\nset repl "curlist: [string range $bl [shrink + 19 "<REPORTEDLISTENERS>" 0 $bl] [shrink - 1 "</REPORTEDLISTENERS>" 0 $bl]]"\r\nset curhigh "curhigh: [string range $bl [shrink + 15 "<PEAKLISTENERS>" 0 $bl] [shrink - 1 "</PEAKLISTENERS>" 0 $bl]]"\r\nset currentl [string range $bl [shrink + 18 "<CURRENTLISTENERS>" 0 $bl] [shrink - 1 "</CURRENTLISTENERS>" 0 $bl]]\r\nset surl "serverurl: [string range $bl [shrink + 11 "<SERVERURL>" 0 $bl] [shrink - 1 "</SERVERURL>" 0 $bl]]"\r\nset cursong "cursong: [string range $bl [shrink + 11 "<SONGTITLE" 0 $bl] [shrink - 1 "</SONGTITLE>" 0 $bl]]"\r\nset songurl [string range $bl [shrink + 9 "<SONGURL>" 0 $bl] [shrink - 1 "</SONGURL>" 0 $bl]]\r\nset bitrate "bitrate: [string range $bl [shrink + 9 "<BITRATE>" 0 $bl] [shrink - 1 "</BITRATE>" 0 $bl]]"\r\nset stitle [string range $bl [shrink + 13 "<SERVERTITLE>" 0 $bl] [shrink - 1 "</SERVERTITLE>" 0 $bl]]\r\nset sgenre [string range $bl [shrink + 13 "<SERVERGENRE>" 0 $bl] [shrink - 1 "</SERVERGENRE>" 0 $bl]]\r\n}}\r\nclose $sock\r\n}\r\n\r\nset temp [open "isonline" w+]\r\nputs $temp "$streamstatus\\n$repl\\n$curhigh\\n$cursong\\n$bitrate"\r\nclose $temp\r\nif {$announce == 1 } {\r\nif {$streamstatus == "isonline: 0" && $oldisonline == "isonline: 1"} {\r\npoststuff privmsg $offlinetext\r\nif {$urltopic == 1} { poststuff topic $offlinetopic }\r\n}\r\nif {$streamstatus == "isonline: 1" && $oldisonline == "isonline: 0" } {\r\nif {$sgenre != ""} {\r\nset sgenre " ($sgenre)"\r\n}\r\npoststuff privmsg "$stitle$sgenre now online @ http://[lindex $surl 1]/listen.pls with [lindex $bitrate 1]kbits $onlinetext"\r\nif {$urltopic == 1} { poststuff topic "$stitle @ http://[lindex $surl 1]/listen.pls streaming at [lindex $bitrate 1]kbits $onlinetopic" }\r\n}}\r\nif {($tellusers == 1) && ($streamstatus == "isonline: 1") && ($oldcurhigh != "curhigh: 0") } {\r\nif {$oldcurhigh != $curhigh} {\r\npoststuff privmsg "new listener peak: [lindex $curhigh 1]"\r\n}\r\nif {$oldcurlist != $repl} {\r\npoststuff privmsg "there are currently [lindex $repl 1] ($currentl) people listening"\r\n}}\r\nif {($tellsongs == 1) && ($oldsong != $cursong) && ($streamstatus == "isonline: 1") } {\r\nif {$songurl != ""} { set songurl " ($songurl)"}\r\nregsub -all "<" $cursong "<" cursong\r\nregsub -all ">" $cursong ">" cursong\r\nregsub -all "&" $cursong "+" cursong  \r\nregsub -all """ $cursong "\\"" cursong\r\nregsub -all "''" $cursong "''" cursong\r\nregsub -all "ÿ" $cursong "" cursong\r\n#poststuff privmsg "$stitle spielt [lrange $cursong 1 [llength $cursong]]$songurl"\r\npoststuff privmsg "$stitle spielt:  [lrange $cursong 1 [llength $cursong]]"\r\n}\r\n\r\nif {($tellbitrate == 1) && ($oldbitrate != $bitrate) && ($streamstatus == "isonline: 1") && ($oldbitrate != "bitrate: 0")} {\r\npoststuff privmsg "bitrate switched to [lindex $bitrate 1]kbps"\r\n}}}\r\n\r\nputlog "*** shoutcast.tcl v1.02 by domsen <domsen@domsen.org> succesfully loaded. turn it up baby."', 2232, 'tcl', 'tcl', '#TCL');
INSERT INTO `pastebin` VALUES (2517, 'Barvaz', '2004-12-25 12:47:35', '$ python freeze.py hello.py\r\n/usr/lib/python2.3/parsesetup.py:3: DeprecationWarning: the regex module is depr\r\necated; please use the re module\r\n  import regex\r\n\r\n  Name                      File\r\n  ----                      ----\r\nm BaseHTTPServer            /usr/lib/python2.3/BaseHTTPServer.py\r\nm FixTk                     /usr/lib/python2.3/lib-tk/FixTk.py\r\nm SocketServer              /usr/lib/python2.3/SocketServer.py\r\nm StringIO                  /usr/lib/python2.3/StringIO.py\r\nm Tkconstants               /usr/lib/python2.3/lib-tk/Tkconstants.py\r\nm Tkinter                   /usr/lib/python2.3/lib-tk/Tkinter.py\r\nm UserDict                  /usr/lib/python2.3/UserDict.py\r\nm __builtin__\r\nm __main__                  hello.py\r\nm _codecs\r\nm _locale                   /usr/lib/python2.3/lib-dynload/_locale.dll\r\nm _random                   /usr/lib/python2.3/lib-dynload/_random.dll\r\nm _socket                   /usr/lib/python2.3/lib-dynload/_socket.dll\r\nm _sre\r\nm _ssl                      /usr/lib/python2.3/lib-dynload/_ssl.dll\r\nm _tkinter                  /usr/lib/python2.3/lib-dynload/_tkinter.dll\r\nm array                     /usr/lib/python2.3/lib-dynload/array.dll\r\nm atexit                    /usr/lib/python2.3/atexit.py\r\nm base64                    /usr/lib/python2.3/base64.py\r\nm binascii                  /usr/lib/python2.3/lib-dynload/binascii.dll\r\nm cStringIO                 /usr/lib/python2.3/lib-dynload/cStringIO.dll\r\nm codecs                    /usr/lib/python2.3/codecs.py\r\nm copy                      /usr/lib/python2.3/copy.py\r\nm copy_reg                  /usr/lib/python2.3/copy_reg.py\r\nm dis                       /usr/lib/python2.3/dis.py\r\nP distutils                 /usr/lib/python2.3/distutils/__init__.py\r\nm distutils.dep_util        /usr/lib/python2.3/distutils/dep_util.py\r\nm distutils.errors          /usr/lib/python2.3/distutils/errors.py\r\nm distutils.log             /usr/lib/python2.3/distutils/log.py\r\nm distutils.spawn           /usr/lib/python2.3/distutils/spawn.py\r\nm distutils.util            /usr/lib/python2.3/distutils/util.py\r\nm dummy_thread              /usr/lib/python2.3/dummy_thread.py\r\nP encodings                 /usr/lib/python2.3/encodings/__init__.py\r\nm encodings.aliases         /usr/lib/python2.3/encodings/aliases.py\r\nm errno\r\nm exceptions\r\nm fcntl                     /usr/lib/python2.3/lib-dynload/fcntl.dll\r\nm fnmatch                   /usr/lib/python2.3/fnmatch.py\r\nm formatter                 /usr/lib/python2.3/formatter.py\r\nm ftplib                    /usr/lib/python2.3/ftplib.py\r\nm getopt                    /usr/lib/python2.3/getopt.py\r\nm getpass                   /usr/lib/python2.3/getpass.py\r\nm glob                      /usr/lib/python2.3/glob.py\r\nm gopherlib                 /usr/lib/python2.3/gopherlib.py\r\nm htmlentitydefs            /usr/lib/python2.3/htmlentitydefs.py\r\nm htmllib                   /usr/lib/python2.3/htmllib.py\r\nm httplib                   /usr/lib/python2.3/httplib.py\r\nm imp\r\nm inspect                   /usr/lib/python2.3/inspect.py\r\nm linecache                 /usr/lib/python2.3/linecache.py\r\nm locale                    /usr/lib/python2.3/locale.py\r\nm macpath                   /usr/lib/python2.3/macpath.py\r\nm macurl2path               /usr/lib/python2.3/macurl2path.py\r\nm markupbase                /usr/lib/python2.3/markupbase.py\r\nm marshal\r\nm math                      /usr/lib/python2.3/lib-dynload/math.dll\r\nm mimetools                 /usr/lib/python2.3/mimetools.py\r\nm mimetypes                 /usr/lib/python2.3/mimetypes.py\r\nm ntpath                    /usr/lib/python2.3/ntpath.py\r\nm nturl2path                /usr/lib/python2.3/nturl2path.py\r\nm opcode                    /usr/lib/python2.3/opcode.py\r\nm os                        /usr/lib/python2.3/os.py\r\nm os2emxpath                /usr/lib/python2.3/os2emxpath.py\r\nm popen2                    /usr/lib/python2.3/popen2.py\r\nm posix\r\nm posixpath                 /usr/lib/python2.3/posixpath.py\r\nm pwd                       /usr/lib/python2.3/lib-dynload/pwd.dll\r\nm py_compile                /usr/lib/python2.3/py_compile.py\r\nm pydoc                     /usr/lib/python2.3/pydoc.py\r\nm quopri                    /usr/lib/python2.3/quopri.py\r\nm random                    /usr/lib/python2.3/random.py\r\nm re                        /usr/lib/python2.3/re.py\r\nm repr                      /usr/lib/python2.3/repr.py\r\nm rfc822                    /usr/lib/python2.3/rfc822.py\r\nm select                    /usr/lib/python2.3/lib-dynload/select.dll\r\nm sgmllib                   /usr/lib/python2.3/sgmllib.py\r\nm site                      /usr/lib/python2.3/site.py\r\nm socket                    /usr/lib/python2.3/socket.py\r\nm sre                       /usr/lib/python2.3/sre.py\r\nm sre_compile               /usr/lib/python2.3/sre_compile.py\r\nm sre_constants             /usr/lib/python2.3/sre_constants.py\r\nm sre_parse                 /usr/lib/python2.3/sre_parse.py\r\nm stat                      /usr/lib/python2.3/stat.py\r\nm string                    /usr/lib/python2.3/string.py\r\nm strop                     /usr/lib/python2.3/lib-dynload/strop.dll\r\nm sys\r\nm tempfile                  /usr/lib/python2.3/tempfile.py\r\nm termios                   /usr/lib/python2.3/lib-dynload/termios.dll\r\nm thread\r\nm threading                 /usr/lib/python2.3/threading.py\r\nm time                      /usr/lib/python2.3/lib-dynload/time.dll\r\nm token                     /usr/lib/python2.3/token.py\r\nm tokenize                  /usr/lib/python2.3/tokenize.py\r\nm traceback                 /usr/lib/python2.3/traceback.py\r\nm tty                       /usr/lib/python2.3/tty.py\r\nm types                     /usr/lib/python2.3/types.py\r\nm urllib                    /usr/lib/python2.3/urllib.py\r\nm urlparse                  /usr/lib/python2.3/urlparse.py\r\nm uu                        /usr/lib/python2.3/uu.py\r\nm warnings                  /usr/lib/python2.3/warnings.py\r\nm webbrowser                /usr/lib/python2.3/webbrowser.py\r\n\r\nMissing modules:\r\n? Carbon.File imported from macpath\r\n? Carbon.Folder imported from tempfile\r\n? Carbon.Folders imported from tempfile\r\n? EasyDialogs imported from getpass\r\n? MacOS imported from Tkinter, py_compile\r\n? SOCKS imported from ftplib\r\n? _winreg imported from urllib\r\n? ce imported from os\r\n? ic imported from pydoc, urllib, webbrowser\r\n? mac imported from os\r\n? msvcrt imported from getpass\r\n? nt imported from ntpath, os\r\n? org.python.core imported from copy\r\n? os.path imported from os\r\n? os2 imported from os\r\n? riscos imported from os\r\n? riscosenviron imported from os\r\n? riscospath imported from os\r\n? rourl2path imported from urllib\r\n? sitecustomize imported from site\r\n\r\nfreezing BaseHTTPServer ...\r\nfreezing FixTk ...\r\nfreezing SocketServer ...\r\nfreezing StringIO ...\r\nfreezing Tkconstants ...\r\nfreezing Tkinter ...\r\nfreezing UserDict ...\r\nfreezing __main__ ...\r\nfreezing atexit ...\r\nfreezing base64 ...\r\nfreezing codecs ...\r\nfreezing copy ...\r\nfreezing copy_reg ...\r\nfreezing dis ...\r\nfreezing distutils ...\r\nfreezing distutils.dep_util ...\r\nfreezing distutils.errors ...\r\nfreezing distutils.log ...\r\nfreezing distutils.spawn ...\r\nfreezing distutils.util ...\r\nfreezing dummy_thread ...\r\nfreezing encodings ...\r\nfreezing encodings.aliases ...\r\nfreezing fnmatch ...\r\nfreezing formatter ...\r\nfreezing ftplib ...\r\nfreezing getopt ...\r\nfreezing getpass ...\r\nfreezing glob ...\r\nfreezing gopherlib ...\r\nfreezing htmlentitydefs ...\r\nfreezing htmllib ...\r\nfreezing httplib ...\r\nfreezing inspect ...\r\nfreezing linecache ...\r\nfreezing locale ...\r\nfreezing macpath ...\r\nfreezing macurl2path ...\r\nfreezing markupbase ...\r\nfreezing mimetools ...\r\nfreezing mimetypes ...\r\nfreezing ntpath ...\r\nfreezing nturl2path ...\r\nfreezing opcode ...\r\nfreezing os ...\r\nfreezing os2emxpath ...\r\nfreezing popen2 ...\r\nfreezing posixpath ...\r\nfreezing py_compile ...\r\nfreezing pydoc ...\r\nfreezing quopri ...\r\nfreezing random ...\r\nfreezing re ...\r\nfreezing repr ...\r\nfreezing rfc822 ...\r\nfreezing sgmllib ...\r\nfreezing site ...\r\nfreezing socket ...\r\nfreezing sre ...\r\nfreezing sre_compile ...\r\nfreezing sre_constants ...\r\nfreezing sre_parse ...\r\nfreezing stat ...\r\nfreezing string ...\r\nfreezing tempfile ...\r\nfreezing threading ...\r\nfreezing token ...\r\nfreezing tokenize ...\r\nfreezing traceback ...\r\nfreezing tty ...\r\nfreezing types ...\r\nfreezing urllib ...\r\nfreezing urlparse ...\r\nfreezing uu ...\r\nfreezing warnings ...\r\nfreezing webbrowser ...\r\ngenerating table of frozen modules\r\nWarning: unknown modules remain: _locale _random _socket _ssl _tkinter array bin\r\nascii cStringIO fcntl math pwd select strop termios time\r\nNow run "make" to build the target: hello\r\n\r\n$ make\r\ngcc -I/usr/include/python2.3 -I/usr/include/python2.3  -c config.c\r\ngcc -I/usr/include/python2.3 -I/usr/include/python2.3  -c frozen.c\r\ngcc   config.o frozen.o /usr/lib/python2.3/config/libpython2.3.a   -lm  -o hello\r\n\r\nconfig.o(.data+0x4):config.c: undefined reference to `_init_codecs''\r\nconfig.o(.data+0xc):config.c: undefined reference to `_init_sre''\r\nconfig.o(.data+0x14):config.c: undefined reference to `_initerrno''\r\nconfig.o(.data+0x1c):config.c: undefined reference to `_initexceptions''\r\nconfig.o(.data+0x24):config.c: undefined reference to `_initimp''\r\nconfig.o(.data+0x2c):config.c: undefined reference to `_initposix''\r\nconfig.o(.data+0x34):config.c: undefined reference to `_initthread''\r\nconfig.o(.data+0x3c):config.c: undefined reference to `_PyMarshal_Init''\r\nconfig.o(.data+0x44):config.c: undefined reference to `_initimp''\r\nconfig.o(.data+0x6c):config.c: undefined reference to `_initgc''\r\nfrozen.o(.text+0x1f):frozen.c: undefined reference to `__imp__PyImport_FrozenModules''\r\nfrozen.o(.text+0x37):frozen.c: undefined reference to `_Py_FrozenMain''\r\ncollect2: ld returned 1 exit status\r\nmake: *** [hello] Error 1', 0, 'none', 'compile python', 'none');
INSERT INTO `pastebin` VALUES (2518, 'liran', '2004-12-25 18:40:51', 'bind pub o !op pub:op\r\nproc pub:op {nick uhost hand chan text} {\r\nputserv "MODE +o $nick"      \r\n}\r\n', 0, 'tcl', 'tcl code', '#EggTCL');
INSERT INTO `pastebin` VALUES (2524, 'joe-', '2004-12-27 13:19:52', '# dunno why you need all that... use this:\r\n\r\nproc timefmt {secs} {\r\n\r\n	if { ![string is integer -strict $secs] } {\r\n		error "First argument must be integer."\r\n	}\r\n	return [duration $secs];\r\n}', 2522, 'tcl', 'proc timefmt', '#EggTCL');
INSERT INTO `pastebin` VALUES (2519, 'Dave', '2004-12-26 00:40:38', 'set datafile ~/egg/data/sv\r\nset date_remove_flag n\r\nbind pub - !ep pub_date\r\n\r\nproc pub_date {nick host hand chan arg} {\r\n	global botnick\r\n	if {[llength $arg] == 0} {\r\n		set reply [getdate [string tolower [nick2suser $nick $chan]]]\r\n		if {[lindex $reply 0] == "pub"} {\r\n			putserv "PRIVMSG $chan :[lrange $reply 1 end]"\r\n		} else {\r\n			putserv "PRIVMSG $nick :[lrange $reply 1 end]"\r\n		}	\r\n		return 1\r\n	}\r\n	if {[lindex $arg 0] == "--help"} {\r\n		datehelp $nick\r\n		return 1\r\n	}	\r\n	if {[llength $arg] == 1} {\r\n 		set arg [string trimright $arg " "]\r\n		if {[nick2suser $arg $chan] != "\\*"} {\r\n			set arg [nick2suser $arg $chan]\r\n		}\r\n		set reply [getdate [string tolower $arg]]\r\n		if {[lindex $reply 0] == "pub"} {\r\n			putserv "PRIVMSG $chan :[join [lrange $reply 1 end]]"\r\n		} else {\r\n			putserv "PRIVMSG $nick :[join [lrange $reply 1 end]]"\r\n		}	\r\n		return 1\r\n	}\r\n	if {[llength $arg] == 2} {\r\n		if {[lindex $arg 0] == "remove"} {\r\n			putserv "PRIVMSG $nick :[deldate [string tolower [lindex $arg 1]] $nick $host]"\r\n			return 1\r\n		}\r\n		if {[lindex $arg 0] == "whoset"} {\r\n			set reply [whodate [lindex [string tolower $arg] 1]]\r\n			if {[lindex $reply 0] == "pub"} {\r\n				putserv "PRIVMSG $chan :[lrange $reply 1 end]"\r\n			} else {\r\n				putserv "PRIVMSG $nick :[lrange $reply 1 end]"\r\n			}	\r\n			return 1\r\n		}	\r\n		putserv "PRIVMSG $nick :[lindex $arg 0] not a known command. Try !date --help"\r\n		return 1\r\n	}\r\n	if {[llength $arg] == 3} {\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [nick2suser $nick $chan]] 00 00 [string toupper [lindex $arg 0]] [lindex $arg 1] [lindex $arg 2] b $nick $host $chan]"\r\n		return 1\r\n	}\r\n	set len [llength [lrange $arg 3 end]]\r\n	set numhash 0\r\n	foreach args [lrange $arg 3 end] {\r\n		if {[regexp (#) $args]} {\r\n			set numhash [expr $numhash + 1]\r\n		}\r\n	}\r\n	if {$numhash == $len} {	\r\n		if {[lsearch [string tolower [lrange $arg 3 end]] $chan] == -1} {\r\n			set chans "[lrange $arg 3 end] $chan"\r\n		} else { \r\n			set chans [lrange $arg 3 end]\r\n		}	\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [nick2suser $nick $chan]] 00 00 [string toupper [lindex $arg 0]] [lindex $arg 1] [lindex $arg 2] b $nick $host $chans]"\r\n		return 1\r\n	}	\r\n	if {[lindex $arg 4] == ""} {\r\n		putserv "PRIVMSG $nick :Please enter a desciption"\r\n		return 0\r\n	}\r\n	if {[regexp {:} [lindex $arg 4]]} { \r\n		regsub {:} [lindex $arg 4] { } time\r\n		putserv "PRIVMSG $nick :[setdate [string tolower [lindex $arg 0]] [lindex $time 1] [lindex $time 0] [string toupper [lindex $arg 1]] [lindex $arg 2] [lindex $arg 3] e $nick $host [lrange $arg 5 end]]" \r\n		return 1\r\n	}\r\n	putserv "PRIVMSG $nick :[setdate [string tolower [lindex $arg 0]] 00 00 [string toupper [lindex $arg 1]] [lindex $arg 2] [lindex $arg 3] e $nick $host [lrange $arg 4 end]]"\r\n	return 1\r\n}	\r\n	\r\n## proc which provides the help \r\n\r\nproc datehelp {nick} {\r\n	global evdatever\r\n	puthelp "NOTICE $nick :Help of Date.tcl version $evdatever"\r\n	puthelp "NOTICE $nick :To input your birthday: !date <month> <day> <year> \\[other chan\\]"\r\n	puthelp "NOTICE $nick :To input an event: !date <event> <month> <day> <year> \\[time\\] <description>"\r\n	puthelp "NOTICE $nick :<month> like Jan, Feb, etc. The other chans that you can input are chans where I put your birthday in the topic."\r\n	puthelp "NOTICE $nick :example 1: You''re birthday is October 2 1981 and you want it in the topic of #foo and #bar (note: I must be ops in those chans to let me set the topic :-)). You say in #foo: !date Oct 2 1981 #bar" \r\n	puthelp "NOTICE $nick :example 2: You''re channelmeeting is Febuary 10 2001 at 19:30. You say: !date mychanmeeting Feb 10 2001 19:30 Meeting of #mychan (Note: the time is in an 24-hour clock. 3pm doesn''t work, 15:00 does. The time isn''t necessary, but might be handy :-))" \r\n	puthelp "NOTICE $nick :To request a date: !date <birthday\\\\event>"\r\n	puthelp "NOTICE $nick :To remove a date: !date remove <birthday\\\\event>"\r\n	puthelp "NOTICE $nick :To see who set the date: !date whoset <birthday\\\\event>"\r\n	return 1\r\n}\r\n\r\n## proc for setting the date	\r\nproc setdate {name min hr mm dd yy type snick shost rest} {\r\n	global datafile\r\n	if {[file exists $datafile]} {\r\n		set datedata [open $datafile r]\r\n		while {![eof $datedata]} {\r\n			set curline [gets $datedata]\r\n			if {[lindex $curline 0] == $name} {\r\n				if {$type == "e"} {\r\n					return "Event already known by me. Remove it first to re-input it."\r\n				}\r\n				if {$type == "b"} {\r\n					return "Your birthday is already known by me. Remove it first to re-input it."\r\n				} \r\n				putlog "Somethings wrong... $name is not a birthday AND not an event."\r\n			}\r\n		}\r\n		close $datedata\r\n	}\r\n        regsub -all {[0-9]} $yy {1} myresult\r\n        if {$myresult != 1111} {\r\n        	return "Wrong year. Please use a year like 2001, 1984, 1945, etc."\r\n        }\r\n	set nmm [lsearch "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC" $mm]\r\n	if {$nmm == "-1"} {\r\n		return "Wrong month. Please input a month like: Jan, Feb, Mar, etc..."\r\n	}\r\n	if {[expr $yy % 4] == 0} {\r\n                set days "31 29 31 30 31 30 31 31 30 31 30 31"\r\n        } else {\r\n                set days "31 28 31 30 31 30 31 31 30 31 30 31"\r\n        }\r\n        if {[lindex $days $nmm] < $dd || $dd == 0} {\r\n        	return "Wrong day. There is no $dd th day in $mm."\r\n        }\r\n	regsub -all {[0-9]} $min {1} myresult\r\n	if {$myresult != 11} {\r\n		return "Wrong kind of minutes.... a minute is a number between 00 and 60"\r\n	}\r\n	if {$min >= 60} {\r\n		return "Wrong kind of minutes.... a minute is a number between 00 and 60"\r\n	}\r\n	regsub -all {[0-9]} $hr {1} myresult\r\n	if {$myresult != 11} {\r\n		return "Wrong kind of hours.... an hour is a number between 00 and 24"\r\n	}\r\n	if {$hr >= 24} {\r\n		return "Wrong kind of hours.... an hour is a number between 00 and 24"\r\n	}\r\n## writing the data to the file        \r\n        set datedata [open $datafile a]\r\n	set rest [join $rest]\r\n        puts $datedata "$name $min $hr $mm $dd $yy $type $snick $shost $rest"\r\n        flush $datedata\r\n        close $datedata\r\n        if {$type == "b"} { \r\n		return "$name ''s birthday is $mm $dd $yy"\r\n	}\r\n	if {$type == "e"} {\r\n		return "$name is $mm $dd $yy at $hr:$min,  $rest"\r\n	}\r\n## if you ever see such a line, you really have a problem :-)\r\n	return "Housten, we have a problem."	\r\n}       \r\n\r\n## proc for finding the date\r\nproc getdate {target} {\r\n	global datafile\r\n	if {![file exists $datafile]} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	set rline ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {		\r\n		set curline [gets $datedata]\r\n		if {[lindex $curline 0] == $target} {\r\n			set rline $curline\r\n		}\r\n	}\r\n	close $datedata\r\n	if {$rline == ""} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	if {[lindex $rline 6] == "b"} {\r\n		set thisyear [lindex [ctime [unixtime]] 4]\r\n	} else {\r\n		set thisyear [lindex $rline 5]\r\n	}\r\n## If someone is born on 29 Feb. you also need a check for that in this proc. Tcl doesn''t like [clock scan "Feb 29 2001"]  :-)\r\n	if {[lindex $rline 3] == "FEB" && [lindex $rline 4] == "29" && (![expr $thisyear %4] == 0) } {\r\n		set thisdate [clock scan "MAR 1 [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n	} else {\r\n		set thisdate [clock scan "[lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1] $thisyear"] \r\n	}\r\n	if {[lindex $rline 6] == "b"} {\r\n		if {$thisdate < [unixtime]} {\r\n# Is the moment at 00:00:00 already over, but has the moment + day not yet passed??\r\n			if {[expr $thisdate + 86400] > [unixtime]} {\r\n				return "pub $target ''s birthday is TODAY!!! $target is now [expr $thisyear - [lindex $rline 5]]" \r\n			} else { \r\n				set thisyear [expr $thisyear + 1]\r\n				if {[lindex $rline 3] == "FEB" && [lindex $rline 4] == "29" && (![expr $thisyear %4] == 0) } {\r\n					set thisdate [clock scan "MAR 1 [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n				} else {\r\n					set thisdate [clock scan "[lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1] $thisyear"]\r\n				}\r\n			}\r\n		}\r\n		return "pub $target ''s birthday in [duration [expr $thisdate - [unixtime]]]. $target will be [expr $thisyear - [lindex $rline 5]]"\r\n	} else {\r\n		if {$thisdate < [unixtime]} {\r\n			return "pub $target was [duration [expr [unixtime] - $thisdate]] ago. ([lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1]) [join [lrange $rline 9 end]]." \r\n		} else {\r\n			return "pub $target is in [duration [expr $thisdate - [unixtime]]]. ([lrange $rline 3 4] [lindex $rline 2]:[lindex $rline 1]) [join [lrange $rline 9 end]]." \r\n		}\r\n	}\r\n## Next line is a quote from "Something''s wrong" from K''s Choice	\r\n	return "msg Your pubic hair ''s on fire!"\r\n}\r\n\r\n## proc for deleting date\r\nproc deldate {target nick host} {\r\n	global datafile date_remove_flag\r\n	if {![file exists $datafile]} {\r\n		return "$target is not set \\/ $target has no birthday set"\r\n	}\r\n	set dates ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {\r\n		set curline [gets $datedata]\r\n		if {$curline != ""} {\r\n			set dates [linsert $dates end $curline]\r\n		}\r\n	}\r\n	close $datedata\r\n	set line "-1"\r\n	set checkthis ""\r\n	foreach date $dates {\r\n		set line [expr $line + 1]\r\n		if {[lindex $date 0] == $target} {\r\n			set checkthis $date\r\n			break\r\n		}\r\n	}\r\n	if {$checkthis == "" } {return "$target is not set \\/ $target has no birthday set"}\r\n	if {[maskhost $host] == [maskhost [lindex $date 8]] || [matchattr [nick2hand $nick] $date_remove_flag]} {\r\n		if {[expr $line >= 0] && [expr $line < [llength $dates]]} {\r\n			set newdata [lreplace $dates $line $line]\r\n			set datedata [open $datafile w]\r\n			foreach newdate $newdata {\r\n				puts $datedata $newdate\r\n			}\r\n			flush $datedata\r\n			close $datedata\r\n			return "$target is deleted"\r\n		} \r\n	} \r\n	putlog "You are not allowed to remove that date."\r\n}\r\n\r\n## proc wich looks everyday for a birthday\r\nbind time - "00 00 * * *" timedate\r\nproc timedate {min hr day month year} {\r\n	global datafile evdtopics\r\n	if {![file exists $datafile]} {\r\n		return 0\r\n	}\r\n	set dates ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {\r\n		set curline [gets $datedata]\r\n		if {$curline != ""} {\r\n			set dates [linsert $dates end $curline]\r\n		}\r\n	}\r\n	close $datedata\r\n	set bdays ""\r\n	foreach date $dates {		\r\n		if {[lindex $date 6] == "b"} {\r\n			if {[string trimleft $day 0] == [string trimleft [lindex $date 4] 0]} {\r\n				set month [string trimleft $month 0]\r\n				if {$month == ""} {set month 0}\r\n				set mnth [lindex "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC" $month]\r\n				if {$mnth == [string toupper [lindex $date 3]]} {\r\n					set bdays [linsert $bdays end $date]\r\n				}\r\n			}	\r\n		}\r\n	}\r\n	if {$bdays == ""} {return 0}\r\n	set chans ""\r\n	foreach bday $bdays {\r\n		foreach chan [lrange $bday 9 end] {\r\n			lappend name($chan) "[lindex $bday 0],"\r\n			lappend age($chan) "[expr $year - [lindex $bday 5]],"\r\n		}\r\n	}\r\n	foreach chan [array names name] {\r\n		if {[llength $name($chan)] == 1} {\r\n			putserv "TOPIC $chan :[string trimright $name($chan) ,] ''s birthday! [string trimright $name($chan) ,] is now [string trimright $age($chan) ,]"\r\n			return 1\r\n		}\r\n		if {(![regexp {t} [lindex [getchanmode $chan] 0]]) || [botisop $chan]} {	\r\n			set evdtopics($chan-b) [topic $chan]\r\n			putserv "TOPIC $chan :Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!" \r\n			set evdtopics($chan-a) "Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!"\r\n			timer 1438 "evdresettopic $chan"\r\n		} else {\r\n			putserv "PRIVMSG $chan :\\002Happy birthday: [string trimright $name($chan) ,]. They are now [string trimright $age($chan) ,]!\\002" \r\n		}\r\n	}	\r\n}	\r\n\r\nproc evdresettopic {chan} {\r\n	global evdtopics\r\n	putlog "[topic $chan] == $evdtopics($chan-a)"\r\n	if {"[topic $chan]" == "$evdtopics($chan-a)"} {\r\n		putserv "TOPIC $chan :$evdtopics($chan-b)"\r\n	}\r\n}		\r\n	\r\n## proc which looksup who set the date\r\nproc whodate {target} {\r\n	global datafile\r\n	if {![file exists $datafile]} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	set rline ""\r\n	set datedata [open $datafile r]\r\n	while {![eof $datedata]} {		\r\n		set curline [gets $datedata]\r\n		if {[lindex $curline 0] == $target} {\r\n			set rline $curline\r\n		}\r\n	}\r\n	close $datedata\r\n	if {$rline == ""} {\r\n		return "msg $target is not set \\/ $target has no birthday set"\r\n	}\r\n	return "pub $target was set by [lindex $rline 7]![lindex $rline 8]"\r\n}	\r\n\r\nproc telldate {nick host target when} {\r\n	global datafile notefile\r\n}\r\n\r\n\r\n## proc which is called if you don''t run stats.mod 1.3.* \r\n## I use the tcl-command from stats.mod because it autoadds hostnames.\r\nset modcheck "1"\r\nforeach mod [modules] {\r\n	if {[lindex $mod 0] == "stats" && [lindex $mod 1] >= 1.3} {set modcheck "0"} \r\n}\r\nif {$modcheck} {\r\n	proc nick2suser {nick chan} {\r\n		if {[nick2hand $nick $chan] == "\\*" || [nick2hand $nick $chan] == ""} {\r\n			return $nick\r\n		} else {\r\n			return [nick2hand $nick $chan]\r\n		}\r\n	}\r\n}\r\n	\r\n\r\nset evdatever "1.3"\r\nputlog "Date.tcl version $evdatever by Evo|ver loaded"			\r\n', 0, 'tcl', 'none', '#EggTCL');
INSERT INTO `pastebin` VALUES (2521, '[-Zod-]', '2004-12-27 01:29:08', 'global time name date txt wait_until ctime\r\nset wait_until [expr [clock seconds]]\r\nbind pub - !ep pub:countdown\r\nbind dcc n add dcc:add\r\n\r\nproc pub:countdown {nick uhost hand chan text} {\r\n	set ctime [expr [clock seconds]]\r\n	if {$ctime < $wait_until} {\r\n		return 0\r\n	}\r\n	set fname "sv.txt"\r\n	set fp [open $fname "r"]\r\n	set data [read $fp]\r\n	set line "0"\r\n	while { [clock scan [lindex $data $line]] < $ctime } {\r\n		incr $line 2\r\n		lreplace $data 0 1\r\n		set fp [open $fp "w"]\r\n		puts $fp [join $lines "\\n"]\r\n	}\r\n	close $fp\r\n	set txt [lindex $data 1]\r\n	set dur [duration [expr [clock scan [lindex $data 0]]-$ctime]]\r\n	set wait_until [expr [$ctime + 5]]\r\n	putquick "notice $nick :There are $dur until $txt"\r\n}\r\n\r\nproc dcc:add {hand idx arg} {\r\n	split $arg\r\n	set time [lindex $arg 0]\r\n	set name [lindex $arg 1]\r\n	set fname "sv.txt"\r\n	set fp [open $fname "a"]\r\n	puts $fp \\"$time\\"\r\n	puts $fp \\"$name\\"\r\n	close $fp\r\n	putdcc $idx "$name is on at $time"\r\n\r\n}', 0, 'tcl', 'no such variable', '#EggTCL');
INSERT INTO `pastebin` VALUES (2520, 'Zod', '2004-12-27 01:28:52', 'global time name date txt wait_until ctime\r\nset wait_until [expr [clock seconds]]\r\nbind pub - !ep pub:countdown\r\nbind dcc n add dcc:add\r\n\r\nproc pub:countdown {nick uhost hand chan text} {\r\n	set ctime [expr [clock seconds]]\r\n	if {$ctime < $wait_until} {\r\n		return 0\r\n	}\r\n	set fname "sv.txt"\r\n	set fp [open $fname "r"]\r\n	set data [read $fp]\r\n	set line "0"\r\n	while { [clock scan [lindex $data $line]] < $ctime } {\r\n		incr $line 2\r\n		lreplace $data 0 1\r\n		set fp [open $fp "w"]\r\n		puts $fp [join $lines "\\n"]\r\n	}\r\n	close $fp\r\n	set txt [lindex $data 1]\r\n	set dur [duration [expr [clock scan [lindex $data 0]]-$ctime]]\r\n	set wait_until [expr [$ctime + 5]]\r\n	putquick "notice $nick :There are $dur until $txt"\r\n}\r\n\r\nproc dcc:add {hand idx arg} {\r\n	split $arg\r\n	set time [lindex $arg 0]\r\n	set name [lindex $arg 1]\r\n	set fname "sv.txt"\r\n	set fp [open $fname "a"]\r\n	puts $fp \\"$time\\"\r\n	puts $fp \\"$name\\"\r\n	close $fp\r\n	putdcc $idx "$name is on at $time"\r\n\r\n}', 0, 'tcl', 'no such variable', '#EggTCL');
INSERT INTO `pastebin` VALUES (2522, '[-Zod-]', '2004-12-27 12:15:04', 'set dur [timefmt 999222 {There are %w weeks, %d days, %h hours, and %m minutes}] \r\nputquick "notice $nick :$dur until $epname."\r\n#only sends  "There are 7 weeks, 2 days, 2 " to the nickname\r\n\r\nproc timefmt {secs {fmt "%h:%m:%s"} } {\r\n\r\n	if { ![string is integer -strict $secs] } {\r\n		error "First argument must be integer."\r\n	}\r\n	set w [expr {$secs/345600}]\r\n	set d [expr {($secs%345600)/86400}]\r\n	set h [expr {(($secs%345600)%86400)/3600}]\r\n	set m [expr {((($secs%345600)%86400)%3600)/60}]\r\n	set s [expr {((($secs%345600)%86400)%3600)%60}]\r\n\r\n	set p "%% % %s $s %m $m %h $h %d $d %w $w"\r\n	set str [string map $p $fmt]\r\n	return $str;\r\n}', 0, 'none', 'only sends &quot;There are 7 weeks, 2 days, 2 &quot;', '#EggTCL');
INSERT INTO `pastebin` VALUES (2523, '&amp;#1511;&amp;#1493;&a', '2004-12-27 12:57:34', '$ python freeze.py hello.py\r\n/usr/lib/python2.3/parsesetup.py:3: DeprecationWarning: the regex module is depr\r\necated; please use the re module\r\n  import regex\r\n\r\n  Name                      File\r\n  ----                      ----\r\nm BaseHTTPServer            /usr/lib/python2.3/BaseHTTPServer.py\r\nm FixTk                     /usr/lib/python2.3/lib-tk/FixTk.py\r\nm SocketServer              /usr/lib/python2.3/SocketServer.py\r\nm StringIO                  /usr/lib/python2.3/StringIO.py\r\nm Tkconstants               /usr/lib/python2.3/lib-tk/Tkconstants.py\r\nm Tkinter                   /usr/lib/python2.3/lib-tk/Tkinter.py\r\nm UserDict                  /usr/lib/python2.3/UserDict.py\r\nm __builtin__\r\nm __main__                  hello.py\r\nm _codecs\r\nm _locale                   /usr/lib/python2.3/lib-dynload/_locale.dll\r\nm _random                   /usr/lib/python2.3/lib-dynload/_random.dll\r\nm _socket                   /usr/lib/python2.3/lib-dynload/_socket.dll\r\nm _sre\r\nm _ssl                      /usr/lib/python2.3/lib-dynload/_ssl.dll\r\nm _tkinter                  /usr/lib/python2.3/lib-dynload/_tkinter.dll\r\nm array                     /usr/lib/python2.3/lib-dynload/array.dll\r\nm atexit                    /usr/lib/python2.3/atexit.py\r\nm base64                    /usr/lib/python2.3/base64.py\r\nm binascii                  /usr/lib/python2.3/lib-dynload/binascii.dll\r\nm cStringIO                 /usr/lib/python2.3/lib-dynload/cStringIO.dll\r\nm codecs                    /usr/lib/python2.3/codecs.py\r\nm copy                      /usr/lib/python2.3/copy.py\r\nm copy_reg                  /usr/lib/python2.3/copy_reg.py\r\nm dis                       /usr/lib/python2.3/dis.py\r\nP distutils                 /usr/lib/python2.3/distutils/__init__.py\r\nm distutils.dep_util        /usr/lib/python2.3/distutils/dep_util.py\r\nm distutils.errors          /usr/lib/python2.3/distutils/errors.py\r\nm distutils.log             /usr/lib/python2.3/distutils/log.py\r\nm distutils.spawn           /usr/lib/python2.3/distutils/spawn.py\r\nm distutils.util            /usr/lib/python2.3/distutils/util.py\r\nm dummy_thread              /usr/lib/python2.3/dummy_thread.py\r\nP encodings                 /usr/lib/python2.3/encodings/__init__.py\r\nm encodings.aliases         /usr/lib/python2.3/encodings/aliases.py\r\nm errno\r\nm exceptions\r\nm fcntl                     /usr/lib/python2.3/lib-dynload/fcntl.dll\r\nm fnmatch                   /usr/lib/python2.3/fnmatch.py\r\nm formatter                 /usr/lib/python2.3/formatter.py\r\nm ftplib                    /usr/lib/python2.3/ftplib.py\r\nm getopt                    /usr/lib/python2.3/getopt.py\r\nm getpass                   /usr/lib/python2.3/getpass.py\r\nm glob                      /usr/lib/python2.3/glob.py\r\nm gopherlib                 /usr/lib/python2.3/gopherlib.py\r\nm htmlentitydefs            /usr/lib/python2.3/htmlentitydefs.py\r\nm htmllib                   /usr/lib/python2.3/htmllib.py\r\nm httplib                   /usr/lib/python2.3/httplib.py\r\nm imp\r\nm inspect                   /usr/lib/python2.3/inspect.py\r\nm linecache                 /usr/lib/python2.3/linecache.py\r\nm locale                    /usr/lib/python2.3/locale.py\r\nm macpath                   /usr/lib/python2.3/macpath.py\r\nm macurl2path               /usr/lib/python2.3/macurl2path.py\r\nm markupbase                /usr/lib/python2.3/markupbase.py\r\nm marshal\r\nm math                      /usr/lib/python2.3/lib-dynload/math.dll\r\nm mimetools                 /usr/lib/python2.3/mimetools.py\r\nm mimetypes                 /usr/lib/python2.3/mimetypes.py\r\nm ntpath                    /usr/lib/python2.3/ntpath.py\r\nm nturl2path                /usr/lib/python2.3/nturl2path.py\r\nm opcode                    /usr/lib/python2.3/opcode.py\r\nm os                        /usr/lib/python2.3/os.py\r\nm os2emxpath                /usr/lib/python2.3/os2emxpath.py\r\nm popen2                    /usr/lib/python2.3/popen2.py\r\nm posix\r\nm posixpath                 /usr/lib/python2.3/posixpath.py\r\nm pwd                       /usr/lib/python2.3/lib-dynload/pwd.dll\r\nm py_compile                /usr/lib/python2.3/py_compile.py\r\nm pydoc                     /usr/lib/python2.3/pydoc.py\r\nm quopri                    /usr/lib/python2.3/quopri.py\r\nm random                    /usr/lib/python2.3/random.py\r\nm re                        /usr/lib/python2.3/re.py\r\nm repr                      /usr/lib/python2.3/repr.py\r\nm rfc822                    /usr/lib/python2.3/rfc822.py\r\nm select                    /usr/lib/python2.3/lib-dynload/select.dll\r\nm sgmllib                   /usr/lib/python2.3/sgmllib.py\r\nm site                      /usr/lib/python2.3/site.py\r\nm socket                    /usr/lib/python2.3/socket.py\r\nm sre                       /usr/lib/python2.3/sre.py\r\nm sre_compile               /usr/lib/python2.3/sre_compile.py\r\nm sre_constants             /usr/lib/python2.3/sre_constants.py\r\nm sre_parse                 /usr/lib/python2.3/sre_parse.py\r\nm stat                      /usr/lib/python2.3/stat.py\r\nm string                    /usr/lib/python2.3/string.py\r\nm strop                     /usr/lib/python2.3/lib-dynload/strop.dll\r\nm sys\r\nm tempfile                  /usr/lib/python2.3/tempfile.py\r\nm termios                   /usr/lib/python2.3/lib-dynload/termios.dll\r\nm thread\r\nm threading                 /usr/lib/python2.3/threading.py\r\nm time                      /usr/lib/python2.3/lib-dynload/time.dll\r\nm token                     /usr/lib/python2.3/token.py\r\nm tokenize                  /usr/lib/python2.3/tokenize.py\r\nm traceback                 /usr/lib/python2.3/traceback.py\r\nm tty                       /usr/lib/python2.3/tty.py\r\nm types                     /usr/lib/python2.3/types.py\r\nm urllib                    /usr/lib/python2.3/urllib.py\r\nm urlparse                  /usr/lib/python2.3/urlparse.py\r\nm uu                        /usr/lib/python2.3/uu.py\r\nm warnings                  /usr/lib/python2.3/warnings.py\r\nm webbrowser                /usr/lib/python2.3/webbrowser.py\r\n\r\nMissing modules:\r\n? Carbon.File imported from macpath\r\n? Carbon.Folder imported from tempfile\r\n? Carbon.Folders imported from tempfile\r\n? EasyDialogs imported from getpass\r\n? MacOS imported from Tkinter, py_compile\r\n? SOCKS imported from ftplib\r\n? _winreg imported from urllib\r\n? ce imported from os\r\n? ic imported from pydoc, urllib, webbrowser\r\n? mac imported from os\r\n? msvcrt imported from getpass\r\n? nt imported from ntpath, os\r\n? org.python.core imported from copy\r\n? os.path imported from os\r\n? os2 imported from os\r\n? riscos imported from os\r\n? riscosenviron imported from os\r\n? riscospath imported from os\r\n? rourl2path imported from urllib\r\n? sitecustomize imported from site\r\n\r\nfreezing BaseHTTPServer ...\r\nfreezing FixTk ...\r\nfreezing SocketServer ...\r\nfreezing StringIO ...\r\nfreezing Tkconstants ...\r\nfreezing Tkinter ...\r\nfreezing UserDict ...\r\nfreezing __main__ ...\r\nfreezing atexit ...\r\nfreezing base64 ...\r\nfreezing codecs ...\r\nfreezing copy ...\r\nfreezing copy_reg ...\r\nfreezing dis ...\r\nfreezing distutils ...\r\nfreezing distutils.dep_util ...\r\nfreezing distutils.errors ...\r\nfreezing distutils.log ...\r\nfreezing distutils.spawn ...\r\nfreezing distutils.util ...\r\nfreezing dummy_thread ...\r\nfreezing encodings ...\r\nfreezing encodings.aliases ...\r\nfreezing fnmatch ...\r\nfreezing formatter ...\r\nfreezing ftplib ...\r\nfreezing getopt ...\r\nfreezing getpass ...\r\nfreezing glob ...\r\nfreezing gopherlib ...\r\nfreezing htmlentitydefs ...\r\nfreezing htmllib ...\r\nfreezing httplib ...\r\nfreezing inspect ...\r\nfreezing linecache ...\r\nfreezing locale ...\r\nfreezing macpath ...\r\nfreezing macurl2path ...\r\nfreezing markupbase ...\r\nfreezing mimetools ...\r\nfreezing mimetypes ...\r\nfreezing ntpath ...\r\nfreezing nturl2path ...\r\nfreezing opcode ...\r\nfreezing os ...\r\nfreezing os2emxpath ...\r\nfreezing popen2 ...\r\nfreezing posixpath ...\r\nfreezing py_compile ...\r\nfreezing pydoc ...\r\nfreezing quopri ...\r\nfreezing random ...\r\nfreezing re ...\r\nfreezing repr ...\r\nfreezing rfc822 ...\r\nfreezing sgmllib ...\r\nfreezing site ...\r\nfreezing socket ...\r\nfreezing sre ...\r\nfreezing sre_compile ...\r\nfreezing sre_constants ...\r\nfreezing sre_parse ...\r\nfreezing stat ...\r\nfreezing string ...\r\nfreezing tempfile ...\r\nfreezing threading ...\r\nfreezing token ...\r\nfreezing tokenize ...\r\nfreezing traceback ...\r\nfreezing tty ...\r\nfreezing types ...\r\nfreezing urllib ...\r\nfreezing urlparse ...\r\nfreezing uu ...\r\nfreezing warnings ...\r\nfreezing webbrowser ...\r\ngenerating table of frozen modules\r\nWarning: unknown modules remain: _locale _random _socket _ssl _tkinter array bin\r\nascii cStringIO fcntl math pwd select strop termios time\r\nNow run "make" to build the target: hello\r\n\r\n$ make\r\ngcc -I/usr/include/python2.3 -I/usr/include/python2.3  -c config.c\r\ngcc -I/usr/include/python2.3 -I/usr/include/python2.3  -c frozen.c\r\ngcc   config.o frozen.o /usr/lib/python2.3/config/libpython2.3.a   -lm  -o hello\r\n\r\nconfig.o(.data+0x4):config.c: undefined reference to `_init_codecs''\r\nconfig.o(.data+0xc):config.c: undefined reference to `_init_sre''\r\nconfig.o(.data+0x14):config.c: undefined reference to `_initerrno''\r\nconfig.o(.data+0x1c):config.c: undefined reference to `_initexceptions''\r\nconfig.o(.data+0x24):config.c: undefined reference to `_initimp''\r\nconfig.o(.data+0x2c):config.c: undefined reference to `_initposix''\r\nconfig.o(.data+0x34):config.c: undefined reference to `_initthread''\r\nconfig.o(.data+0x3c):config.c: undefined reference to `_PyMarshal_Init''\r\nconfig.o(.data+0x44):config.c: undefined reference to `_initimp''\r\nconfig.o(.data+0x6c):config.c: undefined reference to `_initgc''\r\nfrozen.o(.text+0x1f):frozen.c: undefined reference to `__imp__PyImport_FrozenModules''\r\nfrozen.o(.text+0x37):frozen.c: undefined reference to `_Py_FrozenMain''\r\ncollect2: ld returned 1 exit status\r\nmake: *** [hello] Error 1', 2517, 'bash', '&amp;#1488;&amp;#1514;&amp;#1492; &amp;#1489;&amp;#1512;&amp;#1493;&amp;#1493;&amp;#', '#EggTCL');
