Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/script/bxtcl.tcl
1069 views
set blink {}
set cl {}
set blk {}
set blu {}
set grn {}
set cyn {}
set red {}
set mag {}
set yel {}
set wht {}
set hblk {}
set hblu {}
set hgrn {}
set hcyn {}
set hred {}
set hmag {}
set hyel {}
set hwht {}
set blk_b {}
set red_b {}
set grn_b {}
set yel_b {}
set blu_b {}
set mag_b {}
set cyn_b {}
set wht_b {}
set bblk {[0;}
set bblu {[0;}
set bgrn {[0;}
set bcyn {[0;}
set bred {[0;}
set bmag {[0;}
set byel {[0;}
set bwht {[0;}
proc showver {} {
global cyb version botnick
putserv "PRIVMSG $cyb(cur) :\001ACTION is throwing snowballs wif robocod's cyb\002O\002rg$cyb(ver)/($version)\001"
putscr "* $botnick is throwing snowballs wif robocod's cyb\002O\002rg$cyb(ver)/($version)"
}
if ![info exists cyb(cur)] {
set cyb(cur) ""
set cyb(ver) "0.6a1"
set cyb(lst) ""
}
proc bleh {} {
global cyb cl hblk blu red
putscr "robocod's ..............."
putscr {        .r    -4eeee
}
putscr {     z$P         "$$                                                          
}
putscr {   .$$%            $                                                          
}
putscr {  J$$F             ^                                                          
}
putscr { 4$$$                                                                         
}
putscr { $$$F                           =*$                                           
}
putscr { $$$F                             $                                           
}
putscr { $$$F                             $                                           
}
putscr { *$$b                  3$"   ^$"  $.@" ".    .=" "$.  .e d$$c  .r""*ee        
}
putscr {  $$$                   $R   4"   $     ^$  J      $r  $"     .$    $F        
}
putscr {  ^$$$             $    ^$   %    $      $  $      4$  $      ^$    $         
}
putscr {    *$b          .$$     3L /     $r    4$  $F     4F  $        )*""          
}
putscr {      "$c       d$$$      $E      $  ..e$"  ^$.    F  4$       $c.....        
}
putscr {                          4"      "           "**"    4"       .F""""*$       
}
putscr {                          F                                   $" rev  $       
}
putscr {                         @                                    3L     d"       
}
putscr {                       *"                                       "**"          
}
putscr {                                                                              
}
putscr {                                                                              
}
putscr "\002C\002y\002B\002o\002R\002g v$cyb(ver) -=- Advanced BitchX TCL"
}
utimer 4 bleh
proc grabhost {arg} {
global cyb
foreach channel [channels] {
if [onchan [lindex $arg 0] $channel] {
return [getchanhost [lindex $arg 0] $channel]
}}
return 0}
ircii "^set CLIENT_INFORMATION robocod's CyBoRg(TCL)v$cyb(ver) "
if [string match $version "*68f*"] {
ircii "^set status_format3 CyBoRg loaded .. "
putscr "*** Special 68f Stuff being set"
ircii "^window split on"
}
proc cybjoin {arg} {
global cyb
set cyb(cur) "[lindex $arg 0]"
}
ircii "alias sv {tcl showver}"
ircii {alias addf {tcl addf "$0-"}}
proc addf {arg} {
global cyb
set nick [lindex $arg 0]
set flags [lindex $arg 1]
set channels [lrange $arg 2 end]
if {$nick=="" || $flags=="" || $channels==""} {
putscr "*** Usage /addf <nick> <flags> <channel (all for all channels)>"
putscr "*** Flags = O for ops; V for Voice; I for Invite A for autoop; B for auto ban"
putscr "*** N for names access i.e. /ctcp yournick NAME #warez will send a names list for #warez"
putscr "*** i.e. /addf robocod OVI #livid"
return}
set host [grabhost $nick]
if {$host==0} {putscr "FUCCCCCCCK! NICK NOT FOUND! ABORTING!"}
set nig [fixhost $host]
set flagz "$flags"
set flags "[weed $flagz]"
if {$flags==""} {
putscr "*** -\002C\002- None of your flags were valid"
return}
lappend cyb(lst) "$nig $flags $channels"
putscr "*** -\002C\002- Added $nig to friends list --------->"
putscr "*** -\002C\002- $nig $flags $channels"
putscr "*** -\002C\002- Messaging him about his new access ..."
putserv "NOTICE $nick :-\002C\002-You've been added to my friend's list."
putserv "NOTICE $nick :-\002C\002- Access of +$flags on $channels"
putserv "NOTICE $nick :-\002C\002- Enjoy!"
return}
proc fixhost {host} {
if [string match "*.*.*" $host] {
set hose [lindex [split $host @] 1]
set userhost [lrange [split $hose .] 1 end]
set username [lindex [split $host @] 0]
regsub -all " " $userhost "." userhost
return "*!*$username\@*.$userhost"
} else {
return "*!*$host"}}
proc weed {flags} {
if [string match "*o*" $flags] {append flag "O"}
if [string match "*O*" $flags] {append flag "O"}
if [string match "*v*" $flags] {append flag "V"}
if [string match "*V*" $flags] {append flag "V"}
if [string match "*i*" $flags] {append flag "I"}
if [string match "*I*" $flags] {append flag "I"}
if [string match "*a*" $flags] {append flag "A"}
if [string match "*A*" $flags] {append flag "A"}
if [string match "*b*" $flags] {append flag "B"}
if [string match "*B*" $flags] {append flag "B"}
if [string match "*N*" $flags] {append flag "N"}
if [string match "*n*" $flags] {append flag "N"}
return "$flag"
}
ircii "^set flood_protection off"
ircii "^set flood_kick off"
ircii "^set flood_rate 0"
ircii "^set display_ansi on"
ircii "^set script_help ~/.BitchX/NONE"
ircii "^set exec_protection off"
ircii "^set -continued_line"
ircii "^set novice off"
ircii "set hide_private_channels off"
ircii "set tran latin_1"
ircii "set hard_uh_notify on"
ircii "set send_away_msg on"
ircii "set suppress_server_motd on"
ircii "set clock_24hour off"
ircii "set dcc_autoget on"
ircii "set lastlog_level ALL"
ircii "set msglog off"
ircii "set mail 1"
ircii "set show_channel_names on"
ircii "set msglogfile Ctoolz.away"
ircii "eval set logfile .BitchX/cyborg.chanLog"
ircii "set reasonfile BitchX.reason"
ircii "set ctoolz_dir ~/.BitchX"
ircii "set savefile BitchX.sav"
ircii "set eight on"
ircii "set beep_on_msg msgs"
ircii "set beep on"
ircii "set deop_on_deopflood 100"
ircii "set kick_on_deopflood 8"
ircii "set dcc_send_limit 10"
ircii "set dcc_get_limit 0"
ircii "set llook off"
ircii "set input_protection off"
ircii "set llook_delay 60"
ircii "set lastlog 1000"
ircii "set dcc_dldir /home/robocod/"
ircii "set indent on"
#ircii "bind meta2-3 parse_command b"
#ircii "bind meta2-2 parse_command a"
#ircii "bind ^L parse_command bind_control_l"
ircii "bind ^@ AUTOREPLY"
ircii "bind meta3-A parse_command fkey 1"
ircii "bind meta3-B parse_command fkey 2"
ircii "bind meta3-C parse_command fkey 3"
ircii "bind meta3-D parse_command fkey 4"
ircii "bind meta3-E parse_command fkey 5"
ircii "bind meta3-7 parse_command fkey 6"
ircii "bind meta3-8 parse_command fkey 7"
ircii "bind meta3-9 parse_command fkey 8"
ircii "^set status_format  <%R> %*%N%S%H%B %#%Q%A%C%+%I%O %F %^ %> %D %U "
ircii "^set status_format1  <%R> %*%N%S%H%B %#%Q%A%C%+%I%O %F %^ %> %D %U "
ircii "^set status_format2  %1 %L   online %3 %>%M  %T "
ircii "^set status_user1 \(CyBoRg\(robocod\)\)"
ircii "^eval ^set status_user2 ?"
ircii {^eval ^set status_user3 $uptime()}
ircii "^eval ^set status_mail Mail: %M"
#ircii "^eval ^set status_user \$\S\"
ircii "^eval ^set ^status_channel %C"
#ircii "^on ^001 * {^eval ^set status_user $S}"
ircii "^set status_away away"
ircii "^set status_chanop @"
ircii "^set status_clock %T"
ircii "^set status_notify (A: %F)"
#ircii "assign blink "
#ircii "assign cl "
#ircii "assign blk "
#ircii "assign blu "
#ircii "assign grn "
#ircii "assign cyn "
#ircii "assign red "
#ircii "assign mag "
#ircii "assign yel "
#ircii "assign wht "
#ircii "assign hblk "
#ircii "assign hblu "
#ircii "assign hgrn "
#ircii "assign hcyn "
#ircii "assign hred "
#ircii "assign hmag "
#ircii "assign hyel "
#ircii "assign hwht "
#ircii "assign blk_b "
#ircii "assign red_b "
#ircii "assign grn_b "
#ircii "assign yel_b "
#ircii "assign blu_b "
#ircii "assign mag_b "
#ircii "assign cyn_b "
#ircii "assign wht_b "
#ircii "assign bblk [0;"
#ircii "assign bblu [0;"
#ircii "assign bgrn [0;"
#ircii "assign bcyn [0;"
#ircii "assign bred [0;"
#ircii "assign bmag [0;"
#ircii "assign byel [0;"
#ircii "assign bwht [0;"
ircii "set kick_on_nickflood 6"
ircii "set kick_on_pubflood 30"
ircii "set deopflood_time 60"
ircii "set kick_on_deopflood 6"
ircii "set kick_on_nickflood 6"
ircii "set kick_on_pubflood 30"
ircii "set deopflood_time 60"
ircii "set kickflood_time 60"
ircii "set nickflood_time 60"
ircii "set pubflood_time 60"
ircii "set hacking 0"
ircii "set kick_on_kickflood 10"
ircii "set deop_on_kickfp 100"
ircii "set llook off"
ircii "set llook_delay 60"
ircii "set pubflood off"
ircii "set nickflood on"
ircii "set kickflood on"
ircii "set deopflood on"
ircii "set dcc_block_size 1024"
ircii "set dcc_limit 10"
ircii "set hacking 0"
ircii "set dcc_autoget 0"

set cyb(awaymsg) {
{Bored!}
{livid incorp rocks you}
{ircopz are uberlame}
{Automatically set away}
{getting sex}
{getting blown}
{brb}
{bbl}
{the truth is out there i just dont give a shit anymore.}
{eh?}
{bringing death}
{one can short .....}
{half empty or half full, i dont give a shit!}
{elsewhere}
{elsewhen}
{elsewhy}
{or else ..}
}
proc cybAway {arg} {
if {$arg==""} {
global cyb
set non 0 
foreach msg $cyb(awaymsg) {
incr non
}
set awayMSG [lindex $cyb(awaymsg) [rand [expr $non - 1]]]
ircii "/away $awayMSG"
foreach channel [channels] {
putserv "PRIVMSG $channel :\001ACTION is outtie. ($awayMSG)\001"
}
putscr "-\002C\002- Marking you away with messsage: $awayMSG"
return}
ircii "away $arg"
foreach channel [channels] {
putserv "PRIVMSG $channel :\001ACTION is outtie. ($arg)\001"
}
putscr "-\002C\002- Marking you away with messsage: $arg"
return}


proc STATUS_SET {} {
ircii "^set status_format  <%R> %*%N%S%H%B %#%Q%A%C%+%I%O %F %^ %> %D %U "
ircii "^set status_format1  <%R> %*%N%S%H%B %#%Q%A%C%+%I%O %F %^ %> %D %U "
ircii "^set status_format2  %1 %L online %3 %>%M  %T "
ircii "^set status_user1 \(CyBoRg\(robocod\)\)"
ircii "^eval ^set status_user2 ?"
ircii {^eval ^set status_user3 $uptime()}
ircii "^eval ^set status_mail Mail: %M"
ircii "^eval ^set ^status_channel %C"
ircii "^set status_away away"
ircii "^set status_chanop @"
ircii "^set status_clock %T"
ircii "^set status_notify (A: %F)"
utimer 60 STATUS_SET
return}
if ![info exists cyb(timer)] {
STATUS_SET
set cyb(timer) ""
}

ircii "^assign G -\002C\002-"
#finally, friends list support
proc isattr {nick attri} {
global cyb
set h [fixhost [grabhost $nick]]
if {$h=="0"} {return "0"}
set find [lsearch "$cyb(lst)" "*$h*"]
if {$find==-1} {return 0}
set results [lindex $cyb(lst) $find]
set host [lindex $results 0]
set attr [lindex $results 1]
set channels [lrange $results 2 end]
if [string match "*$attri*" "*$attr*"] {return 1}
return}
#autoop?
bind join - *!*@* parse_join
proc parse_join {nick host hand chan} {
global cyb
set h [fixhost [grabhost $nick]]
set find [lsearch "$cyb(lst)" "*$h*"]
if {$find==-1} {return}
set chanaxs [lrange [lindex $cyb(lst) $find] 2 end]
set axs 0
if {$chanaxs=="all"} {
set axs 1}
if {$axs==0} {
foreach chanl $chanaxs {
if {$chanl==$chan} {
set axs 1}
}
}
if [isattr $nick A] {
if {$axs==1} {
putserv "MODE $chan +o $nick"
putscr "-\002C\002- Autoop'ng $nick on $chan (friendzlist)"
return}}
return}
proc zday {} {
global cyb
put}
proc leet {text} {
global cyb botnick
regsub -all "you" $text "yew" text
regsub -all "man" $text "man\002G\002" text
regsub -all "too" $text "tew" text
regsub -all "to" $text "tew" text
regsub -all "two" $text "tew" text
regsub -all "elite" $text "31337" text
regsub -all "e" $text "3" text
regsub -all "o" $text "0" text
regsub -all "l" $text "1" text
regsub -all "t" $text "7" text
regsub -all "s" $text "5" text
putserv "PRIVMSG $cyb(cur) :$text"
putscr "<$botnick> $text"
}
ircii {^alias leet tcl leet "$0-"}
bind ctcp - invite frinv
proc frinv {nick uhost hand dest key arg} {
putscr "$nick u  $uhost h $hand d $dest k  $key a $arg"
}
#welcome to the lamest script EVER. change LAME mirc colors to ANSI.
#Khaled sucks a HUGE ASS DICK for using FUCKING ircle color codes
proc mirc2ansi {txt} {
regsub -all "01,00" $txt {} txt 
regsub -all "01,0" $txt {} txt
regsub -all "1,00" $txt {} txt
regsub -all "1,0" $txt {} txt
regsub -all "1" $txt {} txt
regsub -all "02,00" $txt {} txt 
regsub -all "02,0" $txt {} txt 
regsub -all "2,00" $txt {} txt 
regsub -all "2,0" $txt {} txt 
regsub -all "2" $txt {} txt 
regsub -all "03,00" $txt {} txt 
regsub -all "03,0" $txt {} txt 
regsub -all "3,00" $txt {} txt 
regsub -all "3,0" $txt {} txt 
regsub -all "3" $txt {} txt 
regsub -all "04,00" $txt {} txt 
regsub -all "04,0" $txt {} txt 
regsub -all "4,00" $txt {} txt 
regsub -all "4,0" $txt {} txt 
regsub -all "4" $txt {} txt 
regsub -all "05,00" $txt {} txt 
regsub -all "05,0" $txt {} txt 
regsub -all "5,00" $txt {} txt 
regsub -all "5,0" $txt {} txt 
regsub -all "5" $txt {} txt 
regsub -all "06,00" $txt {} txt        
regsub -all "06,0" $txt {} txt        
regsub -all "6,00" $txt {} txt        
regsub -all "6,0" $txt {} txt        
regsub -all "6" $txt {} txt        
regsub -all "08,00" $txt {} txt
regsub -all "08,0" $txt {} txt
regsub -all "8,00" $txt {} txt
regsub -all "8,0" $txt {} txt
regsub -all "8" $txt {} txt
regsub -all "09,00" $txt {} txt
regsub -all "09,0" $txt {} txt
regsub -all "9,00" $txt {} txt
regsub -all "9,0" $txt {} txt
regsub -all "9" $txt {} txt
regsub -all "10,00" $txt {} txt
regsub -all "10,0" $txt {} txt
regsub -all "10" $txt {} txt
regsub -all "11,00" $txt {} txt
regsub -all "11,0" $txt {} txt
regsub -all "11" $txt {} txt
regsub -all "12,00" $txt {} txt
regsub -all "12,0" $txt {} txt
regsub -all "12" $txt {} txt
regsub -all "13,00" $txt {} txt
regsub -all "13,0" $txt {} txt
regsub -all "13" $txt {} txt
regsub -all "01,01" $txt {} txt
regsub -all "1,01" $txt {} txt
regsub -all "01,1" $txt {} txt
regsub -all "1,1" $txt {} txt
regsub -all "02,01" $txt {} txt
regsub -all "2,01" $txt {} txt
regsub -all "02,1" $txt {} txt
regsub -all "2,1" $txt {} txt
regsub -all "03,01" $txt {} txt
regsub -all "3,01" $txt {} txt
regsub -all "03,1" $txt {} txt
regsub -all "3,1" $txt {} txt
regsub -all "04,01" $txt {} txt
regsub -all "4,01" $txt {} txt
regsub -all "04,1" $txt {} txt
regsub -all "4,1" $txt {} txt
regsub -all "05,01" $txt {} txt
regsub -all "5,01" $txt {} txt
regsub -all "05,1" $txt {} txt
regsub -all "5,1" $txt {} txt
regsub -all "06,01" $txt {} txt 
regsub -all "6,01" $txt {} txt 
regsub -all "06,1" $txt {} txt 
regsub -all "6,1" $txt {} txt 
regsub -all "07,01" $txt {07} txt
regsub -all "7,01" $txt {07} txt
regsub -all "07,1" $txt {07} txt
regsub -all "7,1" $txt {07} txt
regsub -all "08,01" $txt {} txt
regsub -all "8,01" $txt {} txt
regsub -all "08,1" $txt {} txt
regsub -all "8,1" $txt {} txt
regsub -all "09,01" $txt {} txt
regsub -all "9,01" $txt {} txt
regsub -all "09,1" $txt {} txt
regsub -all "9,1" $txt {} txt
regsub -all "10,1" $txt {} txt
regsub -all "10,01" $txt {} txt
regsub -all "11,01" $txt {} txt 
regsub -all "11,1" $txt {} txt 
regsub -all "12,01" $txt {} txt
regsub -all "12,1" $txt {} txt
regsub -all "13,01" $txt {} txt
regsub -all "13,1" $txt {} txt
regsub -all "01,01" $txt {} txt
regsub -all "1,01" $txt {} txt
regsub -all "01,1" $txt {} txt
regsub -all "1,1" $txt {} txt

01,02       03,02 04,02 05,02 06,02   a    08,02 09,02 10,02 11,02 12,02 13,02
01,03 02,03       04,03 05,03 06,03  gold  08,03 09,03 10,03 11,03 12,03 13,03
01,04 02,04 03,04       05,04 06,04  color 08,04 09,04 10,04 11,04 12,04 13,04
01,05 02,05 03,05 04,05       06,05        08,05 09,05 10,05 11,05 12,05 13,05
01,06 02,06 03,06 04,06 05,06              08,06 09,06 10,06 11,06 12,06 13,06

01,10 02,10 03,10 04,10 05,10 06,10        08,10 09,10       11,10 12,10 13,10

}