Skip to content

Instantly share code, notes, and snippets.

@ghuntley
Created October 19, 2017 13:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ghuntley/8a3361b52b22ef2237c6bdf27ea24e9e to your computer and use it in GitHub Desktop.
#rUPTbOT bot util script by erupt....
#greetz: ratphour, cfusion, #eggdrop, #razor, #legends, rhapsody, ievil
# sextronix
# /\ /\ / ___/ /\ / /~__ /~~~/
# /---\ / \/ /__/ / \/ ___/ /___/
#Colors:  - Bold
#written by eRUPT - The EVERLASTing one...
#+----------------------------------------------------------------------+
#| -//- help for this bot script -\\- |
#| 1. Installation - add the line 'source scripts/ruptbot.tcl' minus |
#| the quotes. |
#| 2. Setup - Edit the variables in ruptbot.config and bOOM your |
#| your all customized and stuff :P |
#| 3. Suggestions - email :erupt@adelphia.net |
#| 4. How to get more rUPT tcl's - goto www.ruptbot.com for all your |
#| favorite tcl's. |
#| 5. Your all done. |
#`----------------------------------------------------------------------'
#
# * UPDATE * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- * UPDATE *
# RuptBot is *NO* longer being distrobuted this is a
# private script used for my personal use and for
# #RAZOR, so if you got this somehow else then don't
# come to me for help cause i will bitch you out...
# Release Date - 10-30-96
# * UPDATE * -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- * UPDATE *
# ruptbot is now PUBLIC ... FULLY PUBLIC give it to
# anyone you'd like and there is a website for it now
# www.ruptbot.com
# Public Date - 12-15-98
#
# The beta testers consist of me myself and I
#
# * Warning this is a HUGE script so all you tcl rippers fuck-off your not
# leet by ripping other ppl's shit that i spend many numerous nights
# working on so go get a life other then your puter bitch or go smoke a
# blunt * -eRUPT
#
# things that have been changed wooHAW!@#
# == 2.5 ==
# - well i add'd some more configurable varibles and such so that you can
# disable most of the dangerous public commands from dumass spoofers ya
# this is my most popular complaint about ruptbot so i had to do it jus
# so you guys will not say "uhhh ruptbot is so easy to hack".
# anyhow lemme explain how it works.... well you set the varible below
# "enable_public" to 0 and that disables a bunch of em but here is the
# cool thing each individual user can enable his public commands by
# msg'n the bot his password with /msg botnick verify <password> and
# you can then use you public commands for that scesion (yes your nick
# is removed when you signoff) anyhow thats that one.
#
# - i fixed the password commands and invite msg commands so owners/masts
# won't see your password when you use those commands (dum bug)
#
# - i made a super_bitch setting so that if you don't want masters to be
# able to op non-ops with there friends list or such (i think its very
# annoying to enable but who am i?)
#
# - !op lets you list like more then one person for example:
# !op nick1 nick2 nick3 nick4 ect.......
# == 2.6b ==
# - add'd .topic for compatibility with my lock topic system and made
# a .invite command incase you use the second channel feature and
# stuff
# - fixed bug in enable_public shit i THINK it works fully now test at
# your own risk by setting enable_public(in ruptbot.config) to 0
# - rewrote my help shit so it would be easily updateable
# - add'd timer procedures to the enable_public stuff.....
# == 2.6c ==
# - added a few fixes for the topic thingy's so that my newer ltopic.tcl
# will not interfere with them.
# - made a procedure to automatically make the ruptbot.config file if you
# don't already have it.
# - wrote a new function to edit and save the ruptbot.config file straight
# from remote.
# == 2.7a ==
# - had to fucking fix errors with !setup cause it messed up if you put any
# []' characters in it argggg damnit annoying bug....
# == 3.0 ==
# - alot of shit added and fixed and changed
# - !whois bug fixed
# - added new config options like change prefix command character,
# change flags given to user when using !add and set the idle timelimit
# for dcc chat before he is set away by ruptbot..
# - added locktopic into ruptbot use !lthelp
# - change prefix command character for all commands using !char or
# !setup
# - autoaway in dcc chat added.. use .startidle and .killidle to activate and
# deactivate it change the idlelimit setting in the config file or by
# using !setup
# - you can now change the flags ruptbot add's to a new user when you
# use the !add command.. you can now also use !add <nick> [flags]
# - fixed the !seen bullshit where it displayed wrong seconds
# - took out the 12 flags for voice.. it just uses 1 now
# - added tempdeop to ruptbot.. use !tempdeop <nick> <minutes to be deoped>
# - got a +user public command
# - added commands like !addhost and !delhost and !gethost
# - use a shortened version of !whois by doing !whois <nick> quick
# == 3.01 ==
# - bugs bugs and more bugs fixed from the hardly tested 3.0
# - fixed !setup
# - fixed !whois
# - fixed !chinfo
# == 3.02 ==
# - and got the !chattr command set so now the masters can't give themselves
# owners (I forgot a fucking "")
# == 3.03 ==
# - added last signoff message to !seen
# - added dcc command .flagnote use this to send a mass note to any flag
# usage: .flagnote <flag here> <message here>
# == 3.04 ==
# - added !match <flag>
# - added !myquit <handle>
# == 3.05 ==
# - fixed bugs...
# - added !heard <handle> tells last thing person said and when
# == 3.06 ==
# - added a new flag +6 that protects non voices or non ops from getting kicked
# via a supercleanup or normal cleanup....
# == 3.1 ==
# - added a complete channel add system so you don't gotta fuck with your
# eggdrop config file for much now... and no extra tcl's will be needed
# - added my rDCC dcc system which lets you offer files with !rdcc list
# and saves your dcc list for whenever you boot up the bot no remaking
# the xdcc list... ruptbot saves it..
# - !addhost can be used without putting a host and it will add current
# <nick who is on the channels> host.
#
#
# ======================================================================
# - special thanks to sextronix for his ideas to me
# ======================================================================
# well thats bout it enjoy the script and report the bugs to me "eRUPT" on
# irc or email me at erupt@thenet.net) like usual please -eR!@#!@#!#!
# visit my webpage erupt.home.ml.org
# greetz to real tcl coders - ratphour , godsey(no joke), cfusion, path0s
# much much props to ievil cause he told me soo many helpful bugs I had
# thanks yo...
#Varibles - edit ruptbot.config
proc save_setup {topic1 topic2 topic3 bitch public char idlelimit addflags} {
set file [open ruptbot.config w]
puts $file "#I made this little config file for easy ruptbot upgrading w/o having"
puts $file "#to edit your setup stuff all over again but refer to ruptbot file to"
puts $file "#see if any new stuff was add'd to the config file"
puts $file " "
puts $file "#Preset Topic 1"
puts $file "set topic1 \"$topic1\""
puts $file "#Preset Topic 2"
puts $file "set topic2 \"$topic2\""
puts $file "#Preset Topic 3"
puts $file "set topic3 \"$topic3\""
puts $file "#Super bitch mode 1=on 0=off"
puts $file "set super_bitch $bitch"
puts $file "#Enable !up, !op, and other dangerous public commands? 1=on 0=off"
puts $file "set enable_public $public"
puts $file "#Command Prefix character ex. \"@\" = @op, @version, etc..."
puts $file "set char $char"
puts $file "#dcc autoaway idle timelimit set to 0 if you don't want it"
puts $file "set idlelimit $idlelimit"
puts $file "#default flags given with !add"
puts $file "set add_flags $addflags"
close $file
exec mv ruptbot.config scripts
putlog "Done."
}
if {![file exists scripts/ruptbot.config]} {
putlog "ruptbot config file not found creating one now..."
save_setup test1 test2 test3 0 1 ! 10 +xp
}
source scripts/ruptbot.config
if {![file exists scripts/channz.cfg]} {
set cfile [open channz.cfg w]
puts $cfile ""
close $cfile
exec mv channz.cfg scripts
}
source scripts/channz.cfg
if {![info exists char]} {
putlog "updgrading your config file"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public ! 10 +xp
putlog "Done upgrading... . "
source scripts/ruptbot.config
}
#---[OK don't change anything after this line or you will catch a beat down!---
proc putnot {nick msg} { putserv "NOTICE $nick :$msg" }
proc putmsg {nick msg} { putserv "PRIVMSG $nick :$msg" }
proc putchan {chan msg} { putserv "PRIVMSG $chan :$msg" }
if {![info exists signoff(signoffscripton)]} { set signoff(signoffscripton) "" }
bind sign - * getsign
proc getsign {nick host hand chan reas} {
global signoff
if {$hand == "*"} { return 0 }
set hand "[string tolower $hand]"
set signoff($hand) "$reas"
}
if {![info exists lastm(lastmscripton)]} { set lastm(lastmscripton) "" }
bind pubm - * getpubm
proc getpubm {nick host hand chan arg} {
global lastm
if {$hand == "*"} { return 0 }
set date "[time] [date]"
set hand "[string tolower $hand]"
set lastm($hand) "$date $arg"
}
proc botonchan {chan} {
set junk 0
foreach c [channels] {
if {[string match $chan $c]=="1"} { set junk 1 }
}
return $junk
}
set ver v3.06
if {![info exists verifylist]} {
set verifylist " "
}
#!setup
#this proc will never work hah :P
proc strip_char {arg} {
set count 0
foreach l $arg {
lappend strings $l
}
while {$count < [llength $arg]} {
set currentword [lindex $arg $count]
set count2 0
while {$count2 < [llength [strip $currentword]]} {
set currentletter [lindex [strip $currentword] $count2]
if {$currentletter=="["} {
set currentword [lreplace $currentword $count2 $count2 "\["]
}
if {$currentletter=="]"} {
set currentword [lreplace $currentword $count2 $count2 "\]"]
}
set strings [lreplace $strings $count $count [join $currentword ""]]
incr count2 1
}
incr count 1
}
return $strings
}
proc pub_setup {nick uhost hand chan arg} {
global ver char topic1 topic2 topic3 super_bitch enable_public char idlelimit add_flags
if {$arg==""} {
putnot $nick "Usage: ${char}setup <what-to-set> <what-to-set-to>"
putnot $nick "Pick out of topic1, topic2, topic3, super-bitch, enable-public, command-char, idlelimit, add-flags"
putnot $nick "If you dunno what one of those are type !setup help <thing>"
return 0
}
set setup_flag [string tolower [lindex $arg 0]]
set setup_arg [lrange $arg 1 end]
switch $setup_flag {
help { set setup_arg [string tolower [lrange $arg 1 end]]
switch $setup_arg {
topic1 { putnot $nick "topic1 is the 1st preset topic"
putnot $nick "it is currently set as: $topic1"
return 0 }
topic2 { putnot $nick "topic1 is the 2nd preset topic"
putnot $nick "it is currently set as: $topic2"
return 0 }
topic3 { putnot $nick "topic3 is the 3rd preset topic"
putnot $nick "it is currently set as: $topic3"
return 0 }
super-bitch { putnot $nick "super-bitch is the setting for the super bitch mode setting"
if {$super_bitch=="0"} { set bitch "0\(off\)" } else { set bitch "1\(on\)" }
putnot $nick "it is currently set as: $bitch"
return 0 }
enable-public { putnot $nick "enable-public is the setting to enable public op commands"
if {$enable_public=="0"} { set pub "0\(off\)" } else { set pub "1\(on\)" }
putnot $nick "it is currently set as: $pub"
return 0 }
command-char { putnot $nick "command-char sets the prefix character for all commands"
putnot $nick "it is currently set as: $char"
return 0 }
idlelimit { putnot $nick "Idlelimit is how long a user can idle on dcc chat before setting him as away"
putnot $nick "it is currently set as : $idlelimit minutes"
return 0 }
add-flags { putnot $nick "add-flags are the default flags given to a user when you use !add"
putnot $nick "it is currently set as : $add_flags"
return 0 } } }
topic1 { if {$setup_arg==""} {
putnot $nick "topic1 currently set to: $topic1"
return 0
}
putnot $nick "topic1 set to: $setup_arg"
set topic1 "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
topic2 { if {$setup_arg==""} {
putnot $nick "topic2 currently set to: $topic2"
return 0
}
putnot $nick "topic2 set to: $setup_arg"
set topic2 "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
topic3 { if {$setup_arg==""} {
putnot $nick "topic3 currently set to: $topic3"
return 0
}
putnot $nick "topic3 set to: $setup_arg"
set topic3 "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
topic2 { if {$setup_arg==""} {
putnot $nick "topic2 currently set to: $topic2"
return 0
}
putnot $nick "topic2 set to: $setup_arg"
set topic2 "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
super-bitch { if {$setup_arg==""} {
putnot $nick "super-bitch currently set to: $super_bitch"
return 0
}
putnot $nick "super-bitch set to: $setup_arg"
set super_bitch "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
enable-public { if {$setup_arg==""} {
putnot $nick "enable-public currently set to: $enable_public"
return 0
}
putnot $nick "enable-public set to: $setup_arg"
set enable_public "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
command-char { if {$setup_arg==""} {
putnot $nick "char currently set to: $char"
return 0
}
putnot $nick "char set to: $setup_arg"
set char "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
binds $setup_arg 1
return 0 }
idlelimit { if {$setup_arg==""} {
putnot $nick "idlelimit currently set to: $idlelimit minutes"
return 0
}
putnot $nick "idlelimit set to: $setup_arg minutes"
set idlelimit $setup_arg
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 }
add-flags { if {$setup_arg==""} {
putnot $nick "add-flags currently set to: $add_flags"
return 0
}
putnot $nick "add-flags set to: $setup_arg"
if {[string index $setup_arg 0] == "+"} {
set setup_arg "+${setup_arg}"
}
set add_flags "$setup_arg"
save_setup $topic1 $topic2 $topic3 $super_bitch $enable_public $char $idlelimit $add_flags
return 0 } }
putnot $nick "You have chosen an invalid choice Try again"
}
#!version
proc pub_version {nick uhost hand chan rest} {
global ver
putserv "PRIVMSG $chan :rUPT bAWT $ver by eRUPT<www.ruptbot.com>"
return 1
}
#.topic <topic>
proc dcc_topic {hand idx arg} {
global topicinfo
set chan [lindex $arg 0]
if {![info exists topicinfo(locked$chan)]} {
set topicinfo(locked$chan) 0
}
set topic "[lrange $arg 1 end]"
if {$topic == ""} {
putdcc $idx "Usage: .topic <channel> <topic you want for channel>"
return 0
}
if {$topicinfo(locked$chan) == "1"} {
putdcc $idx "Sorry topic is locked by $topicinfo(locked$chan)"
return 0
}
if {[botonchan $chan]=="0"} {
putdcc $idx "Either i am not op'd on $chan or it is not a valid channel"
return 0
}
putserv "TOPIC $chan :$topic"
putdcc $idx "Topic on $chan was changed to <$arg> at yer request <rB!>"
return 1
}
bind dcc o topic dcc_topic
#!topic <put topic>
proc pub_topic {nick uhost hand chan arg} {
global topicinfo char
if {$arg == ""} {
putnot $nick "Usage: ${char}topic <topic you want for channel>"
return 0
}
if {![info exists topicinfo(locked$chan)]} {
set topicinfo(locked$chan) 0
}
if {$topicinfo(locked$chan) == "1"} {
putnot $nick "Sorry topic is locked by $topicinfo(lwho$chan)"
return 0
}
putserv "TOPIC $chan :$arg"
putnot $nick "Topic on $chan was changed to <$arg> at yer request <rB!>"
return 1
}
#!topic1
proc pub_topic1 {nick uhost hand chan rest} {
global topic1 topicinfo
if {![info exists topicinfo(locked$chan)]} {
set topicinfo(locked$chan) 0
}
if {$topicinfo(locked$chan) == "1"} {
putnot $nick "Sorry topic is locked by $topicinfo(lwho$chan)"
return 0
}
putserv "TOPIC $chan :$topic1"
putnot $nick "Topic set to Topic 1"
return 1
}
#!topic2
proc pub_topic2 {nick uhost hand chan rest} {
global topic2 topicinfo
if {![info exists topicinfo(locked$chan)]} {
set topicinfo(locked$chan) 0
}
if {$topicinfo(locked$chan) == "1"} {
putnot $nick "Sorry topic is locked by $topicinfo(lwho$chan)"
return 0
}
putserv "TOPIC $chan :$topic2"
putnot $nick "Topic set to Topic 2"
return 1
}
#!topic3
proc pub_topic3 {nick uhost hand chan rest} {
global topic3 topicinfo
if {![info exists topicinfo(locked$chan)]} {
set topicinfo(locked$chan) 0
}
if {$topicinfo(locked$chan) == "1"} {
putnot $nick "Sorry topic is locked by $topicinfo(lwho$chan)"
return 0
}
putserv "TOPIC $chan :$topic3"
putnot $nick "Topic set to topic 3"
return 1
}
bind dcc - flagnote dcc_flagnote
proc dcc_flagnote {hand idx arg} {
set flag "[lindex $arg 0]"
set sendtoos "[userlist $flag]"
set note [lrange $arg 1 end]
set notelen "[string length $note]"
if {$note==""} {
putdcc $idx "Usage: .flagnote Purpose: Sends note to all users with the flag"
return 0
}
if {$notelen >450} {
putdcc $idx "Would you mind keeping it under 450 characters lamer?"
return 0
}
append note " \002- This was a massnote to all users with +$flag.\002"
foreach i $sendtoos {
sendnote $hand $i $note
}
putdcc $idx "Note sent to all +$flag users."
putlog "#$hand# flagnote"
}
foreach c [channels] {
set c [string tolower $c]
if {![info exists topicinfo(locked$c)]} { set topicinfo(locked$c) 0 }
if {![info exists topicinfo(ltopic$c)]} { set topicinfo(ltopic$c) "" }
if {![info exists topicinfo(lwho$c)]} { set topicinfo(lwho$c) "" }
}
bind msg m ltopic msg_ltopic
bind msg m ultopic msg_ultopic
bind msg - ltstat msg_ltstat
bind topc - * topic_check
bind dcc m ltopic dcc_ltopic
bind dcc m ultopic dcc_ultopic
bind dcc - ltstat dcc_ltstat
# !ltopic <#channel> <topic>
proc topic_lock {nick uhost hand chan arg} {
global topicinfo char
set channel [string tolower [lindex $arg 0]]
set cipot [lrange $arg 1 end]
if {$arg=="" || $cipot==""} {
putnot $nick "Usage: ${char}ltopic <#channel> <topic>"
return 0
}
if {[string index [lindex $arg 0] 0] != "#"} {
putnot $nick "I am detecting you didn't put a channel in !ltopic"
putnot $nick "Usage: ${char}ltopic <#channel> <topic>"
return 0
}
if {![info exists topicinfo(locked$channel)]} {
putnot $nick "I am not in $channel or it was add'd after i booted up"
return 0
}
if {$topicinfo(locked$channel)=="1"} {
putnot $nick "Topic has already been locked by $topicinfo(lwho$channel) please unlock it first"
putnot $nick "Use: !ultopic <#channel>"
return 0
}
set topiclen [string length $cipot]
if {$topiclen > 90} {
putnot $nick "Sorry that topic is too long must be 90 characters or less"
return 0
}
putserv "PRIVMSG $channel :The topic is now Locked"
putserv "TOPIC $channel :$cipot"
set topicinfo(locked$channel) 1
set topicinfo(ltopic$channel) "$cipot"
set topicinfo(lwho$channel) $nick
}
# !ultopic #channel
proc topic_unlock {nick uhost hand chan arg} {
global topicinfo char
if {$arg==""} {
putnot $nick "Usage: ${char}ultopic <#channel>"
return 0
}
set channel [string tolower [lindex $arg 0]]
if {![info exists topicinfo(locked$channel)]} {
putnot $nick "I am not in $channel or it was add'd after i booted up"
return 0
}
if {$topicinfo(locked$channel)=="1"} {
set topicinfo(locked$channel) "0"
set topicinfo(ltopic$channel) ""
set topicinfo(lwho$channel) ""
putserv "PRIVMSG $channel :The topic has been UNLocked."
return 0
} else {
putnot $nick "Topic was not UNLocked cause it was never locked to begin with"
}
}
# topic check procedure
proc topic_check {nick uhost hand channel arg} {
global topicinfo botnick altnick
set channel [string tolower $channel]
if {![info exists altnick]} { set altnick "" }
if {$nick=="$botnick"} { return 0 }
if {$nick=="$altnick"} { return 0 }
if {$topicinfo(locked$channel)=="0"} { return 0 } else {
putserv "TOPIC $channel :$topicinfo(ltopic$channel)"
putserv "PRIVMSG $channel :Sorry topic has been locked by \002$topicinfo(lwho$channel)\002"
}
return 1
}
# !ltstat <#channel>
proc topic_status {nick uhost hand chan arg} {
global topicinfo char
if {$arg==""} {
putnot $nick "Usage: ${char}ltstat <#channel>"
return 0
}
set check "0"
set channel [string tolower [lindex $arg 0]]
foreach c [channels] {
if {[string match $channel $c]=="1"} { set check 1 }
}
if {$check=="0"} {
putnot $nick "From what i know i am not on that channel"
return 0
}
if {![info exists topicinfo(locked$channel)]} { set topicinfo(locked$channel) 0 }
if {$topicinfo(locked$channel)=="1"} {
putnot $nick "Topic is currently locked.."
putnot $nick "Locked by $topicinfo(lwho$channel)"
putnot $nick "And locked topic being: $topicinfo(ltopic$channel)"
return 0
}
if {$topicinfo(locked$channel)=="0"} {
putnot $nick "Topic is not locked at the moment.."
return 0
}
return 1
}
# /msg ltopic - no need to waist space with the whole procedure written
# over again heh :P
proc msg_ltopic {nick uhost hand arg} {
set blah ""
topic_lock $nick $uhost $hand $blah $arg
}
# /msg ultopic
proc msg_ultopic {nick uhost hand arg} {
set blah ""
topic_unlock $nick $uhost $hand $blah $arg
}
# /msg ltstat
proc msg_ltstat {nick uhost hand arg} {
set blah ""
topic_status $nick $uhost $hand $blah $arg
}
# .ltopic <#channel> <topic>
proc dcc_ltopic {hand idx arg} {
global topicinfo
set channel [string tolower [lindex $arg 0]]
set cipot [lrange $arg 1 end]
if {($arg=="" || $cipot=="")} {
putdcc $idx "Usage: .ltopic <#channel> <topic>"
return 0
}
if {[string index $channel 0] !="#"} {
putdcc $idx "I don't think you entered in a channel name"
putdcc $idx "Usage: .ltopic <#channel> <topic>"
return 0
}
if {![info exists topicinfo(locked$channel)]} {
putdcc $idx "I am not in $channel or it was add'd after i booted up"
return 0
}
if {$topicinfo(locked$channel)=="1"} {
putdcc $idx "Topic has already been locked by $topicinfo(lwho$channel) please unlock it first"
putdcc $idx "Use: .ultopic <#channel>"
return 0
}
set topiclen [string length $cipot]
if {$topiclen > 90} {
putdcc $idx "Sorry that topic is too long must be 90 characters or less"
return 0
}
putserv "PRIVMSG $channel :The topic is now Locked"
putserv "TOPIC $channel :$cipot"
set topicinfo(locked$channel) 1
set topicinfo(ltopic$channel) "$cipot"
set topicinfo(lwho$channel) $hand
}
# .ultopic <#channel>
proc dcc_ultopic {hand idx arg} {
global topicinfo
if {$arg==""} {
putdcc $idx "Usage: .ultopic <#channel>"
return 0
}
set channel [string tolower [lindex $arg 0]]
if {![info exists topicinfo(locked$channel)]} {
putdcc $idx "I am not in $channel or it was add'd after i booted up"
return 0
}
if {$topicinfo(locked$channel)=="1"} {
set topicinfo(locked$channel) "0"
set topicinfo(ltopic$channel) ""
set topicinfo(lwho$channel) ""
putserv "PRIVMSG $channel :The topic has been UNLocked."
return 0
} else {
putdcc $idx "Topic was not UNLocked cause it was never locked to begin with"
}
}
# .ltstat <#channel>
proc dcc_ltstat {hand idx arg} {
global topicinfo
if {$arg==""} {
putdcc $idx "Usage: .ltstat <#channel>"
return 0
}
set check "0"
set channel [string tolower [lindex $arg 0]]
foreach c [channels] {
if {[string match $channel $c]=="1"} { set check 1 }
}
if {$check=="0"} {
putdcc $nick "From what i know i am not on that channel"
return 0
}
if {![info exists topicinfo(locked$channel)]} { set topicinfo(locked$channel) 0 }
if {$topicinfo(locked$channel)=="1"} {
putdcc $idx "Topic is currently locked.."
putdcc $idx "Locked by $topicinfo(lwho$channel)"
putdcc $idx "And locked topic being: $topicinfo(ltopic$channel)"
return 0
}
if {$topicinfo(locked$channel)=="0"} {
putdcc $idx "Topic is not locked at the moment.."
return 0
}
return 1
}
# !lthelp
proc topic_help {nick uhost hand chan arg} {
putnot $nick ".--( \002 Topic Lock System \002 )--."
putnot $nick "| \002!\002ltopic \002<\002topic\002>\002 \002locks topic \002|"
putnot $nick "| \002!\002ultopic \002unlocks topic\002 |"
putnot $nick "| \002!\002ltstat \002shows you the\002 |"
putnot $nick "| \002current lock\002 |"
putnot $nick "| \002topic status\002 |"
putnot $nick "`------------------------------'"
return 1
}
# !time
proc pub_time {nick uhost hand chan rest} {
set time "[time] [date]"
putserv "PRIVMSG $chan :$time <rB!>"
return 1
}
# !mode <flags>
proc pub_mode {nick uhost hand chan arg} {
global char
set flags [lindex $arg 0]
if {$arg == ""} {
putserv "NOTICE $nick :Usage: ${char}mode <flags>"
return 0
}
channel set $chan chanmode "$flags"
putserv "MODE $chan $flags"
putnot $nick "Set mode for channel $chan \"$flags\" <rB!>"
return 1
}
proc pub_invite {nick uhost hand arg} {
global botnick
if {$hand=="*"} { return 0 }
if {![matchattr $hand 1]} {
if {![matchattr $hand o]} { return 0 }
}
set pass [lindex $arg 0]
set chan [lindex $arg 1]
set passchk [passwdok $hand $pass]
if {$pass == ""} {
putnot $nick "Usage: /msg $botnick invite <pass> <channel>"
return 0
}
if {$chan == ""} {
putnot $nick "Usage: /msg $botnick invite <pass> <channel>"
return 0
}
#if you want a channel to be private and require a flag to get into it
#change fivechannel to whatever that channel may be and 5 to whatever
#flag you require that user to have
set fivechannel "#razornet"
if {[string tolower $chan] == "$fivechannel"} {
if {![matchattr $hand 5]} {
putnot $nick "Sorry you are not authorized for axs to $fivechannel"
return 0
}
}
if {!$passchk} {
putnot $nick "Sorry $pass is the wrong password or you have not set a pass yet... <rB!>"
return 0
}
if {[botonchan $chan] == 0} {
putnot $nick "Sorry i am not on $chan"
return 0
}
putserv "INVITE $nick $chan"
putnot $nick "You have been invited to $chan enjoy yer stay <rB!>"
putlog "\($uhost\) !$hand! INVITE..."
}
bind msg - invite pub_invite
#.invite <nick> <channel>
proc dcc_invite {hand idx arg} {
global botnick
if {$hand=="*"} { return 0 }
if {![matchattr $hand 1]} {
if {![matchattr $hand o]} { return 0 }
}
set nick [lindex $arg 0]
set chan [lindex $arg 1]
if {$chan == ""} {
putdcc $idx "Usage: .invite <nick> <channel>"
return 0
}
#if you want a channel to be private and require a flag to get into it
#change fivechannel to whatever that channel may be and 5 to whatever
#flag you require that user to have
set fivechannel "#razornet"
if {[string tolower $chan] == "$fivechannel"} {
if {![matchattr $hand 5]} {
putdcc $idx "Sorry you are not authorized for axs to $fivechannel"
return 0
}
}
if {[botonchan $chan] == 0} {
putdcc $idx "Sorry i am not on $chan"
return 0
}
putserv "INVITE $nick $chan"
putdcc $idx "You have been invited to $chan enjoy yer stay <rB!>"
putlog "#$hand# INVITE..."
}
bind dcc - invite dcc_invite
# !heard <handle>
proc pub_heard {nick uhost hand chan arg} {
global char lastm
if {$arg == ""} {
putnot $nick "usage: !heard <handle> \(returns last thing they said\)"
return 0
}
set heard "last message is not in memory"
set laston 1
set person [lindex $arg 0]
if {[info exists lastm($person)]} {
set heard "$person said: \002[lrange $lastm($person) 4 end]\002 on: \002[lindex $lastm($person) 0] [lindex $lastm($person) 1] [lindex $lastm($person) 2] [lindex $lastm($person) 3]\002"
set laston 0
}
if {$laston} {
if {![validuser $person]} { set lastjoin "is not on my user list" } else {
set lastjoin "[diff [unixtime] [getlaston $person]]"
}
}
if {$laston} { set heard "$heard $person was last on the channel: $lastjoin" }
putnot $nick "$heard"
return 1
}
#!kick
proc pub_kick {nick uhost hand chan rest} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!kick is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $rest 0]
set reason [lrange $rest 1 end]
if {$reason==""} { set reason "dON'T fUCK wITH $nick" }
append userhost $who "!" [getchanhost $who $chan]
set target [finduser $userhost]
if {$target != "*"} {
if {([matchattr $target 4] || [matchattr $target m])} {
putnot $nick "Can't kick a leet nigga shithead!!"
return 0
}
}
if {$who == ""} {
putnot $nick "Usage: ${char}kick <nick>"
return 0
}
if {[string tolower $who]==[string tolower $botnick]} {
putnot $nick "Sneaky fucker."
putserv "KICK $chan $nick :I'm not gonna kick myself retard"
return 0
}
putserv "PRIVMSG $chan :Do i smell a lamer?"
putserv "KICK $chan $who :$reason <rB!>"
return 1
}
#-+-------( Protection commands like if you kick badass's(+mn) )--------+-
bind kick - * protect_kick
proc protect_kick {nick uhost hand chan dork reas} {
global botnick altnick
if {$altnick==""} { set altnick "" }
if {($nick=="$botnick" || $nick=="$altnick")} {
return 0
}
if {[matchattr $hand b]} {
return 0
}
append userhost $dork "!" [getchanhost $dork $chan]
set target [finduser $userhost]
if {$target != "*"} {
if {([matchattr $target 4] || [matchattr $target m])} {
putserv "INVITE $dork $chan"
putnot $dork "AutoInvite on kick <rB!>"
if {![matchattr $hand m]} {
putnot $nick "You kicked the wrong nigger!"
putserv "KICK $chan $nick :$dork is protected you fucker! <rB!>"
}
return 1
}
}
}
bind mode - "* +o *" mode_op
proc mode_op {nick uhost hand chan modechng} {
global botnick super_bitch
if {$super_bitch=="0"} { return 0 }
if {[string tolower $nick]==[string tolower $botnick]} { return 0 }
set op [lindex $modechng 1]
if {[string tolower $op]==[string tolower $botnick]} { return 0 }
append userhost $op "!" [getchanhost $op $chan]
set dork [finduser $userhost]
if {$dork=="*"} {
if {([matchattr $hand m] || [matchattr $hand n])} {
putserv "MODE $chan -o $op"
putnot $nick "Only i can +o ppl!"
putnot $nick "!add him to the bot is its important"
return 0
}
}
if {[validuser $dork]} {
if {[matchattr $hand m]} {
if {![matchattr $dork o]} {
putserv "MODE $chan -o $op"
putnot $nick "Only i can +o ppl!"
return 0
}
}
}
}
# ---+-- end of protection junk --+---
# -+-------------------+ Start of enable ops procs. +---------------------+-
# msg verify password
proc msg_verify {nick uhost hand pass} {
global botnick enable_public verifylist
if {$enable_public=="1"} {
putnot $nick "No need for this command public commands are enabled"
return 0
}
if {$hand=="*"} { return 0 }
if {$pass==""} {
putnot $nick "Usage: /msg $botnick verify <pass>"
return 0
}
set chpasswd "[passwdok $hand $pass]"
if {$chpasswd=="0"} {
putnot $nick "Sorry wrong password"
return 0
}
if {[verify_hand $hand]==""} {
putnot $nick "Your handle is already on the list"
return 0
}
addverify $hand
putnot $nick "Your handle is now verified. Public commands enabled"
putlog "\($uhost\) !$hand! VERIFY..."
}
bind msg o verify msg_verify
proc dccjoin_addverify {hand idx} {
addverify $hand
}
bind chon o * dccjoin_addverify
proc addverify {hand} {
global verifylist
lappend verifylist [list $hand]
}
proc remverify {hand} {
global verifylist
set count 0
while {$count < [llength $verifylist]} {
set lurker [lindex ${verifylist} $count]
if {[string compare ${hand} [lindex $lurker 0]] == 0} {
set verifylist [lreplace ${verifylist} $count $count]
}
incr count 1
}
}
proc verify_hand {hand} {
global verifylist
set ret no
foreach check $verifylist {
if {[string match $check $hand]} {
set ret ""
}
}
return $ret
}
proc signoff {nick uhost hand chan reas} {
if {$hand=="*"} { return 0 }
remverify $hand
}
bind sign - * signoff
proc check_verifylist {} {
global verifylist
set channels "[channels]"
foreach hand $verifylist {
foreach chan $channels {
if {![handonchan $hand $chan]} {
remverify $hand
}
}
}
}
proc enable_timer {} {
global enable_public enable_timer_id verifylist
set enable_timer_id [timer 60 enable_timer]
if {$enable_public=="0"} { check_verifylist }
if {$enable_public=="1"} { set verifylist "" }
}
if {![info exists enable_timer_id]} {
set enable_timer_id [timer 60 enable_timer]
}
#-+- end of verify procedures -+-
# -+---------------------+ Start of channel procs. +-----------------------+-
#this is for v3.1 or higher..
proc add_channel_temp {nick uhost hand chan arg} {
if {$arg==""} {
putnot $nick "Usage: !addtempchan <#channel> \[chanmodes\]"
return 0
}
set chann [lindex $arg 0]
set modes [lindex $arg 1]
foreach c [channels] {
if {[string tolower $chann]==[string tolower $c]} {
putnot $nick "I detect $chann is already one of my channels"
return 0
}
}
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !addtempchan <#channel> \[chanmodes\]"
return 0
}
channel add $chann
if {$modes !=""} {
channel set $chann chanmode "$modes"
}
putnot $nick "Added $chann to bots memory it will be erased when bot dies or rehashs."
return 1
}
proc add_channel_perm {nick uhost hand chan arg} {
if {$arg==""} {
putnot $nick "Usage: !addpermchan <#channel> \[chanmodes\]"
return 0
}
set chann [lindex $arg 0]
set modes [lindex $arg 1]
foreach c [channels] {
if {[string tolower $chann]==[string tolower $c]} {
putnot $nick "I detect $chann is already one of my channels"
return 0
}
}
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !addpermchan <#channel> \[chanmodes\]"
return 0
}
channel add $chann
if {$modes !=""} {
channel set $chann chanmode "$modes"
}
set chanread [open scripts/channz.cfg r]
set chanlines ""
while {![eof $chanread]} {
lappend chanlines [gets $chanread]
}
close $chanread
lappend chanlines "channel add $chann"
set chanfile [open scripts/channz.cfg w]
if {$modes !=""} {
lappend chanlines "channel set $chann chanmode \"$modes\""
}
foreach line $chanlines {
puts $chanfile "$line"
}
close $chanfile
putnot $nick "Added $chann to ruptbots permanent channel list."
return 1
}
#!deltempchan
proc del_channel_temp {nick uhost hand chan arg} {
if {$arg==""} {
putnot $nick "Usage: !deltempchan <#channel>"
return 0
}
set chann [lindex $arg 0]
foreach c [channels] {
if {[string tolower $chann]==[string tolower $c]} {
set valid "1"
}
}
if {!$valid} {
putnot $nick "$chann is not a valid channel to delete"
return 0
}
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !deltempchan <#channel>"
return 0
}
channel remove $chann
putnot $nick "channel \002$chann\002 has been nuked. <\002rB!\002>"
return 1
}
#!delpermchan
proc del_channel_perm {nick uhost hand chan arg} {
# global replacelist chanlist
if {$arg==""} {
putnot $nick "Usage: !delpermchan <#channel>"
return 0
}
set chann [lindex $arg 0]
foreach c [channels] {
if {[string tolower $chann]==[string tolower $c]} {
set valid "1"
}
}
if {!$valid} {
putnot $nick "$chann is not a valid channel to delete"
return 0
}
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !delpermchan <#channel>"
return 0
}
set chanlist ""
set chanfile [open scripts/channz.cfg r]
while {![eof $chanfile]} {
lappend chanlist [gets $chanfile]
}
close $chanfile
set replacelist ""
set count 0
foreach line $chanlist {
set found "0"
foreach word $line {
if {[string tolower $word]==[string tolower $chann]} {
set found 1
}
}
if {$found} { append replacelist $count " " }
incr count 1
}
set count 0
foreach replace $replacelist {
set chanlist "[lreplace $chanlist [expr $replace - $count] [expr $replace - $count]]"
incr count 1
}
set chanfilew [open scripts/channz.cfg w]
foreach line $chanlist {
if {$line!=""} {
puts $chanfilew $line
}
}
close $chanfilew
channel remove $chann
putnot $nick "channel \002$chann\002 has been nuked. <\002rB!\002>"
return 1
}
proc add_modes_temp {nick uhost hand chan arg} {
if {$arg==""} {
putnot $nick "Usage: !addchanmode <#channel> \[chanmodes\]"
return 0
}
set chann [lindex $arg 0]
set modes [lindex $arg 1]
foreach c [channels] {
if {[string tolower $chann]==[string tolower $c]} {
putnot $nick "I detect $chann is already one of my channels"
return 0
}
}
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !addchanmode <#channel> \[chanmodes\]"
return 0
}
channel set $arg
putnot $nick "Added \002$arg\002 setting to bots memory it will be erased when bot dies or rehashs."
return 1
}
proc add_modes_perm {nick uhost hand chan arg} {
if {$arg==""} {
putnot $nick "Usage: !addmodesperm <#channel> \[chanmodes\]"
return 0
}
set chann [lindex $arg 0]
set modes [lindex $arg 1]
if {[string index $chann 0] !="#"} {
putnot $nick "Usage: !addmodesperm <#channel> \[chanmodes\]"
return 0
}
channel set $chann $modes
set chanread [open scripts/channz.cfg r]
set chanlines ""
while {![eof $chanread]} {
lappend chanlines [gets $chanread]
}
close $chanread
set chanfile [open scripts/channz.cfg w]
lappend chanlines "channel set $chann $modes"
foreach line $chanlines {
if {$line!=""} {
puts $chanfile "$line"
}
}
close $chanfile
putnot $nick "Added \002$chann\002 setting to ruptbots permanent channel list."
return 1
}
#--- end channel procs
#!seen <nick>
proc diff {time ime} {
set year [expr $time - $ime]
if {$year > 31536000} {
set yearsfull [expr $year/31536000]
set years [expr int($yearsfull)]
set yearssub [expr 31536000*$years]
set day [expr $year - $yearssub]
}
if {$year < 31536000} {
set day $year
set years 0
}
if {$day > 86400} {
set daysfull [expr $day/86400]
set days [expr int($daysfull)]
set dayssub [expr 86400*$days]
set hour [expr $day - $dayssub]
}
if {$day < 86400} {
set hour $day
set days 0
}
if {$hour > 3600} {
set hoursfull [expr $hour/3600]
set hours [expr int($hoursfull)]
set hourssub [expr 3600*$hours]
set min [expr $hour - $hourssub]
}
if {$hour < 3600} {
set min $hour
set hours 0
}
if {$min > 60} {
set minsfull [expr $min/60]
set mins [expr int($minsfull)]
set minssub [expr 60*$mins]
# set secs [expr $hour - $minssub]
}
if {![info exists mins]} { set mins "0" } elseif {$mins==""} {
set mins "0" }
if {$years < 1} { set years "" } elseif {$years=="1"} {
set years "1 year " } else { set days "$years years " }
if {$days < 1} { set days "" } elseif {$days=="1"} {
set days "1 day " } else { set days "$days days " }
if {$hours < 1} { set hours "" } elseif {$hours=="1"} {
set hours "1 hour " } else { set hours "$hours hours " }
if {$mins < 1} { set mins "" } elseif {$mins=="1"} {
set mins "1 minute " } else { set mins "$mins minutes " }
# if {$secs < 1} { set secs "" } elseif {$secs=="1"} {
# set secs "1 second " } else { set secs "$secs seconds " }
set result "$years$days$hours$minsago."
return $result
}
proc pub_seen {nick uhost hand chan arg} {
global botnick signoff
set idle [getchanidle $arg $chan]
set min "minutes" ; if {$idle=="1"} { set min "minute" }
if {$idle=="0"} { set min "Active in $chan" ; set idle "" }
if {$arg==""} { return 0 }
if {([string compare [string tolower $botnick] [string tolower $arg]] == 0)} {
putserv "PRIVMSG $chan :Your staring at him dork. <rB!>"
return 0
}
if {([string compare [string tolower $hand] [string tolower $arg]] == 0)} {
putserv "PRIVMSG $chan :You must be a lonely dork cause your looking for yourself <rB!>"
return 0
}
if {$arg=="god"} {
putserv "PRIVMSG $chan :$arg???! i am just a bot not a priest go get a monk for questions like this or goto #bible you dork"
return 0
}
if {$arg=="your mom"} {
putserv "PRIVMSG $chan :I have not seen my mom but i saw your mom last night she gives good head."
return 0
}
if {$arg=="my mom"} {
putserv "PRIVMSG $chan :I dunno where you mom is go try the #oldandcheap channel.."
return 0
}
set arglen [llength $arg]
if {$arglen > 1} {
putserv "PRIVMSG $chan :Hey idiot i havn't seen any1 with a fucked up nick like that go try that shit on a NON-rUPTbOT bitch "
return 0
}
set arglent [string length $arg]
if {$arglent > 11} {
putserv "PRIVMSG $chan :Hey idiot i havn't seen any1 with a fucked up nick like that go try that shit on a NON-rUPTbOT bitch "
return 0
}
if {[onchansplit $arg $chan]} {
putserv "PRIVMSG $chan :$arg is on a net-split <rB!>"
return 0
}
if {([onchan $arg $chan] || [handonchan $arg $chan])} {
putserv "PRIVMSG $chan :$arg is on the channel and has been idle for: $idle $min <rB!>"
return 0
}
if {![validuser $arg]} {
putserv "PRIVMSG $chan :i dunno who the hell $arg is, he must be a lammah <rB!>"
return 0
}
set last "[getlaston $arg]"
set when "[diff [unixtime] $last]"
set lastsignoff "last signoff: \002none in memory\002"
if {[info exists signoff([string tolower $arg])]} { set lastsignoff "last signoff: \002$signoff([string tolower $arg])\002" }
putserv "PRIVMSG $chan :I saw $arg last, $when - $lastsignoff <rB!>"
return 1
}
#!myquit <person>
proc pub_myquit {nick uhsot hand chan arg} {
global signoff
set guy [lindex $arg 0]
if {$guy == ""} {
putnot $nick "usage: !myquit <handle> \(tells you last quit message\)"
return 0
}
set lastsignoff "last signoff: \002none in memory\002"
if {[info exists signoff([string tolower $guy])]} { set lastsignoff "last signoff: \002$signoff([string tolower $arg])\002" }
putnot $nick "$lastsignoff <\002rB!\002>"
return 1
}
#!test
proc pub_test {nick uhost hand chan rest} {
global botnick
putserv "PRIVMSG $chan :tESTiNG 1..2..3"
putserv "PRIVMSG $chan :$botnick iS rEADY tO gO 4 dA nAWTY nOW <rB!>"
return 1
}
# !match <flag>
proc pub_match {nick uhsot hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!match is disabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
if {$arg == ""} {
putnot $nick "usage: !match <flag(s)> \(returns users with that flag\)"
return 0
}
set matches "[userlist [lindex $arg 0]]"
if {$matches == ""} {
putnot $nick "nobody matches to the flags specified try again <\002rB!\002>"
return 0
}
putnot $nick "\[[lindex $arg 0] \002-\002 [llength $matches]\] \002$matches\002 <\002rB!\002>"
return 1
}
# !annoy <nick>
proc pub_annoy {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!annoy is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
if {$arg == ""} {
putnot $nick "Usage: ${char}annoy <nick>"
return 0
}
set dork [lindex $arg 0]
set annoy "[lrange $arg 1 end]"
if {[onchan $dork $chan]} {
append userhost $dork "!" [getchanhost $dork $chan]
set maskhost [maskhost $userhost]
set target [finduser $maskhost]
if {$target != "*"} {
if {[matchattr $target m]} {
putnot $nick "I wouldn't dare annoy $dork i phear him!"
putnot $nick "hmmmmm you sneaky fucker take this"
set dork $nick
set annoy "haha now lets see who is annoyed!!"
}
}
}
if {$dork=="$chan"} {
putnot $nick "Dork i am gonna annoy you instead."
set dork $nick
}
if {$dork=="[lindex $arg 0]"} {
putnot $nick "Attempting to annoy $dork" }
if {$annoy==""} { set annoy "-+- iSN'T tHIS aNNOYING?!? <aNNOY rEQUESTED bY $nick>" }
putmsg $dork "$annoy" ; putmsg $dork "$annoy" ; putmsg $dork "$annoy"
putmsg $dork "$annoy" ; putmsg $dork "$annoy"
return 1
}
# !cleanup
proc pub_kick2 {nick uhost hand chan arg} {
global botnick enable_public
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!cleanup is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set dorks [chanlist $chan]
set dorklist ""
set reason "$nick requested a channel cleanup <rB!>"
set return 1
foreach p $dorks {
if {![isop $p $chan] && ![isvoice $p $chan]} {
set userhost ""
append userhost $p "!" [getchanhost $p $chan]
set mask [maskhost $userhost]
set target [finduser $mask]
if {[matchattr $target 6]} { set return 0 }
if {[isvoice $p $chan]} { set return 0 }
if {$return != 0} { append dorklist " " $p }
}
}
if {$dorklist == ""} {
putnot $nick "Couldn't find anyone needing kicking <rB!>"
return 0
}
putserv "PRIVMSG $chan :Attention all idle-kings you will all be kick'd now if you have no ops or +v's, have fun and remember $nick was the ass to type !cleanup <rB!>"
set blah "[llength $dorklist]"
putnot $nick "Kicking \[$blah\] User(s): $dorklist"
set count 0
while {$count < $blah} {
putserv "KICK $chan [lindex $dorklist $count] :$reason"
incr count 1
}
return 1
}
proc pub_kick3 {nick uhost hand chan arg} {
global botnick enable_public
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!supercleanup is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set dorks [chanlist $chan]
set dorklist ""
set reason "$nick requested a super cleanup <rB!>"
set return 1
foreach p $dorks {
if {![isop $p $chan]} {
set userhost ""
append userhost $p "!" [getchanhost $p $chan]
set mask [maskhost $userhost]
set target [finduser $mask]
if {![matchattr $target 6]} { set return 1 } else { set return 0 }
if {$return != 0} { append dorklist " " $p }
}
}
if {$dorklist == ""} {
putnot $nick "Couldn't find anyone needing kicking <rB!>"
return 0
}
putserv "PRIVMSG $chan :Attention all idle-kings you will all be kick'd now if you have no ops have fun and remember $nick was the ass to type !supercleanup <rB!>"
set blah "[llength $dorklist]"
putnot $nick "Kicking \[$blah\] User(s): $dorklist"
set count 0
while {$count < $blah} {
putserv "KICK $chan [lindex $dorklist $count] :$reason"
incr count 1
}
return 1
}
# !bk <nick>
proc pub_bk {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!bk is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $arg 0]
set reason "[lrange $arg 1 end] <rB!>"
if {$who == ""} {
putnot $nick "Usage: ${char}bk <nick>"
return 0
}
if {[string tolower $who]==[string tolower $botnick]} {
putnot $nick "Sneaky fucker."
putserv "KICK $chan $nick :I'm not gonna kick myself retard"
return 0
}
if {![onchan $who $chan]} {
putnot $nick "You crackhead, $arg is not on $chan! <rB!>"
return 0
}
if {[onchansplit $who $chan]} {
putnot $nick "He's on a net-split damn those are annoying! <rB!>"
return 0
}
if {$who == $botnick} {
putnot $nick "Hheheh...I should kick you instead"
putserv "KICK $chan $nick :I ain't gonna kick myself lammah!"
return 0
}
append userhost "!" [getchanhost $who $chan]
set banmask [maskhost $userhost]
set target [finduser $userhost]
if {$target != "*"} {
if {([matchattr $target 4] || [matchattr $target m])} {
putserv "NOTICE $nick :Can't kick a leet niggah shithead"
return 0
}
}
putnot $nick "Attempting to kick $who."
if {$reason==""} { set reason "bankick requested <rB!>" }
putserv "MODE $chan -o+b $who $banmask"
newchanban $chan $banmask $hand "Banned by $nick" 60
putserv "KICK $chan $who :$reason"
return 1
}
# !permbk <nick> (be careful this is a permanent ban it ads)
proc pub_permbk {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!permbk is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $arg 0]
set reason "[lrange $arg 1 end] <rB!>"
if {$who == ""} {
putserv "NOTICE $nick :Usage: ${char}permbk <nick>"
return 0
}
if {![onchan $who $chan]} {
putnot $nick "You crackhead, $arg is not on $chan <rB!>"
return 0
}
if {[onchansplit $who $chan]} {
putnot $nick "He's on a net-split damn those are annoying! <rB!>"
return 0
}
if {$who == $botnick} {
putnot $nick "Hehehe...I should kick you instead"
putserv "KICK $chan $nick :I ain't gonna kick myself you lAMMAH! <rB!>"
return 0
}
append userhost "!" [getchanhost $who $chan]
set banmask [maskhost $userhost]
set target [finduser $userhost]
if {$target != "*"} {
if {([matchattr $target m] || [matchattr $target 4])} {
putnot $nick "Can't kick a leet niggah shithead"
return 0
}
}
putnot $nick "Attempting to kick $arg..."
newchanban $chan $banmask $hand $reason 0
if {$reason==""} { set reason "PermBANkick requested <rB!>" }
putserv "MODE $chan -o+b $who $banmask"
putserv "KICK $chan $who :$reason"
return 1
}
#-+------------ --- -- - Add/del/chattr commands and others ---+-
# !add <nick>
proc pub_add {nick uhost hand chan arg} {
global botnick enable_public add_flags char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!add is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $arg 0]
set flags [lindex $arg 1]
if {$who == ""} {
putnot $nick "Usage: ${char}add <nick> \[flags\]"
return 0
}
if {![onchan $who $chan]} {
putnot $nick "$who is not on $chan dork"
return 0
}
if {[validuser $who]} {
putnot $nick "$who is already on the bot you crackhead!"
return 0
}
append userhost $who "!" [getchanhost $who $chan]
set hostmask [maskhost $userhost]
set target [finduser $hostmask]
if {![adduser $who $hostmask]} {
putserv "NOTICE $nick :Couldn't add \"$who\""
return 0
}
if {$flags!=""} {
set add_flags $flags
}
chattr $who $add_flags
putnot $nick "Add'd $who to $botnick <rB!>"
putnot $who "You have been add'd to $chan's custom bot use (/msg $botnick pass <yourpassword>.) to set a password enjoy <rB!>"
putnot $who "And for invites msg the bot invite <pass> <channel>"
return 1
}
# !+user
proc pub_+user {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!+user is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set handle [lindex $arg 0]
set hostmask [lindex $arg 1]
if {$arg==""} {
putnot $nick "Usage: ${char}+user <handle> <hostmask>"
return 0
}
if {$hostmask==""} {
putnot $nick "Usage: ${char}!+user <handle> <hostmask>"
return 0
}
if {[validuser $handle]} {
putnot $nick "Sorry $handle is already on the bot"
return 0
}
adduser $handle $hostmask
putnot $nick "Added $handle \($hostmask\) with no password or flags."
save
return 1
}
# !addbot <handle> <address>
proc pub_addbot {nick uhost hand chan arg} {
global char
set handle [lindex $arg 0]
set address [lindex $arg 1]
if {$arg==""} {
putnot $nick "Usage: ${char}addbot <handle> <address>"
return 0
}
if {$address==""} {
putnot $nick "Usage: ${char}addbot <handle> <address>"
return 0
}
if {[validuser $handle]} {
putnot $nick "Sorry somebody by the handle $handle already exists"
return 0
}
if {[addbot $handle $address]=="0"} {
putnot $nick "Uhmmm the !addbot fucked up doesn't that suck?"
return 0
}
putnot $nick "Added bot $handle with address $address"
chattr $handle +b-xp
save
return 1
}
# !addvoice <nick>
proc pub_onjoin {nick uhost hand chan} {
if {[matchattr $hand 1]} { putserv "MODE $chan +v $nick" }
return 1
}
bind join 1 *!*@* pub_onjoin
proc pub_add2 {nick uhost hand chan arg} {
global botnick char
set who [lindex $arg 0]
if {$who == ""} {
putnot $nick "Usage: {$char}addvoice <nick>"
return 0
}
if {![onchan $who $chan]} {
putnot $nick "$who is not on $chan..."
return 0
}
if {[validuser $who]} {
putnot $nick "$who is already on the bot you crackhead"
return 0
}
append userhost $who "!" [getchanhost $who $chan]
set hostmask [maskhost $userhost]
set target [finduser $hostmask]
set flags "+p1-x"
if {![adduser $who $hostmask]} {
putnot $nick "Couldn't add \"$who\" to the bot"
return 0
}
putnot $nick "Add'd $who to $botnick <rB!>"
putnot $who "you have been add'd to $botnick set a pass"
putnot $who "for invites /msg $botnick invite <pass> <#channel>"
if {[chattr $who $flags] == "*"} {
putnot $nick "$arg not known to me <rB!>"
return 0
}
putserv "MODE $chan +v $who"
save
return 1
}
# !del <nick>
proc pub_del {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!del is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set wh [lindex $arg 0]
set who [nick2hand $wh $chan]
if {$who==""} { set who "$wh" }
set del [deluser $arg]
if {$arg == ""} {
putnot $nick "Usage: ${char}del <handle> or ${char}-user <handle>"
return 0
}
if {$del == "*"} {
putnot $nick "$arg is not known to me <rB!>"
putserv "PRIVMSG $chan :$arg is not known to me <rB!>"
return 0
}
putnot $nick "$arg has been terminated he must been a bitch! <rB!>"
return 1
}
# !chattr <nick> <flags>
proc pub_chattr {nick uhost hand chan arg} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!chattr is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $arg 0]
set target $who
set flags [lindex $arg 1]
if {[onchan $who $chan]} {
append userhost $who "!" [getchanhost $who $chan]
set target [finduser $userhost]
}
if {$arg == ""} {
putnot $nick "Usage: ${char}chattr <nick> <flags>"
return 0
}
if {![validuser $target]} {
if {![validuser $who]} {
putnot $nick "$who is not known to me <rB!>"
putserv "PRIVMSG $chan :$who is not known to me <rB!>"
return 0
}
}
if {$flags == ""} {
if {[chattr $who]=="*"} {
putnot $nick "chattr $who failed"
return 0
}
putnot $nick "$who's flags on $botnick are: '[chattr $who]'"
return 0
}
set owner 0
foreach f [split $flags ""] {
if {[string tolower $f]=="n"} {
set owner 1
}
}
if {$owner=="1"} {
if {![matchattr $hand n]} {
putnot $nick "Sorry fucker you can't give anyone +n flag unless you yourself got the +n flag"
return 0
}
}
if {[chattr $target $flags] == "*"} {
putnot $nick "Sorry that fucker is not in my database!"
return 0
}
putnot $nick "flags for $who are now '[chattr $target]' <rB!>"
return 1
}
# !addhost <handle> <hostmask>
proc pub_addhost {nick uhost hand chan host} {
global char
set handl [lindex $host 0]
set hostmask [lindex $host 1]
if {$host==""} {
putnot $nick "Usage: ${char}addhost <handle <hostmask>"
return 0
}
if {[validuser $handl]=="0"} {
putnot $nick "I don't know who $handl is"
return 0
}
if {[matchattr $handl n]} {
if {![matchattr $hand n]} {
putnot $nick "You can't change a owners hostmask list"
return 0
}
}
addhost $handl $hostmask
putnot $nick "$hostmask was added to $handl.. his hostmask list is now"
putnot $nick "Hosts: [gethosts $handl]"
return 1
}
# !delhost
proc pub_delhost {nick uhost hand chan host} {
global char
set handl [lindex $host 0]
set hostmask [lindex $host 1]
if {$host==""} {
putnot $nick "Usage: ${char}delhost <handle <hostmask>"
return 0
}
if {[validuser $handl]=="0"} {
putnot $nick "I don't know who $handl is"
return 0
}
if {[matchattr $handl n]} {
if {![matchattr $hand n]} {
putnot $nick "You can't change a owners hostmask list"
return 0
}
}
if {[delhost $handl $hostmask]=="0"} {
putnot $nick "That host mask is not on $handl's hostmask list"
putnot $nick "Here are the valid hostmasks on his list:"
putnot $nick "[gethosts $handl]"
return 0
}
putnot $nick "$hostmask has been deleted from $handl's hostmask list"
putnot $nick "Hosts: [gethosts $handl]"
return 1
}
# !gethost <handle>
proc pub_gethost {nick uhost hand chan handl} {
global char
if {$handl==""} {
putnot $nick "Usage: ${char}gethost <handle>"
return 0
}
if {[validuser $handl]=="0"} {
putnot $nick "$handl is not known to me"
return 0
}
set hosts [gethosts $handl]
putnot $nick "$handl's host mask list is as follows:"
putnot $nick "$hosts"
return 1
}
# !shitlist
bind join 3 *!*@* onjoin_shit
proc onjoin_shit {nick uhost hand chan} {
set reason [getxtra $hand]
if {$reason==""} { set reason "yOU hAVE bEEN sHITTED oN" }
append userhost $nick "!" [getchanhost $nick $chan]
set hostmask [maskhost $userhost]
if {[matchattr $hand 3]} {
putserv "MODE $chan -o+b $nick $hostmask"
putserv "KICK $chan $nick :$reason <rB!>"
return 0
}
return 1
}
proc pub_shit {nick uhost hand chan rest} {
global botnick enable_public char
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!shitlist is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $rest 0]
append userhost $who "!" [getchanhost $who $chan]
set target [finduser $userhost]
if {([matchattr $target m] || [matchattr $target 4])} {
putnot $nick "Can't shit on a leet nigga"
return 0
}
set reason [lrange $rest 1 end]
set flag "+3"
if {$reason==""} { set reason "yOU hAVE bEEN sHiTTED oN" }
if {$rest==""} {
putnot $nick "Usage: ${char}shitlist <nick> <reason>"
return 0
}
if {![onchan $who $chan]} {
putnot $nick "$who is not on $chan"
return 0
}
if {[validuser $target]} {
if {[chattr $target $flag]=="*"} {
putnot $nick "Shitlist failed." ; return 0 }
if {[setxtra $target $reason]=="0"} {
putnot $nick "Shitlist error: Could'nt save reason" ; return 0 }
set hostmask [maskhost $userhost]
putserv "MODE $chan -o+b $who $hostmask"
putserv "KICK $chan $who :$reason <rB!>"
return 0
}
set hostmask [maskhost $userhost]
set target [finduser $hostmask]
if {[adduser $who $hostmask]=="*"} {
putserv "NOTICE $nick :Couldn't add \[$who\]"
return 0
}
if {[chattr $who $flag]=="*"} {
putnot $nick "Shitlist failed." ; return 0 }
if {[setxtra $who $reason]=="0"} {
putnot $nick "Shitlist error: could not save reason" ; return 0 }
putserv "MODE $chan -o+b $who $hostmask"
putserv "KICK $chan $who :$reason <rB!>"
putnot $nick "$who has been shitted on <rB!>"
return 1
}
proc pub_noshit {nick uhost hand chan arg} {
global botnick char enable_public
set verified "[verify_hand $hand]"
if {$enable_public=="0"} {
if {$verified=="no"} {
putnot $nick "!unshit is diabled for you man"
putnot $nick "You can enable it and other public commands if you"
putnot $nick "verify yourself with the bot by using the command"
putnot $nick "/msg $botnick verify <password>"
return 0
}
}
set who [lindex $arg 0]
set flag "-3"
if {$who==""} {
putnot $nick "Usage: ${char}unshit <shitted dork>"
return 0
}
if {![validuser $who]} {
putnot $nick "$who is not on the shitlist you lamer"
return 0
}
if {![matchattr $who 3]} {
putnot $nick "$who is not on the shitlist you lamer"
return 0
}
if {[chattr $who $flag]=="*"} {
putnot $nick "Unshit failed." ; return 0 }
putnot $nick "$who is no longer on the shit list"
return 1
}
# !shitted
bind pub o !shitted pub_shitted
proc pub_shitted {nick uhost hand chan rest} {
set ppl "[userlist]"
set dorklist ""
set reaslist ""
set list ""
foreach p $ppl {
if {[matchattr $p 3]} {
append dorklist " " $p
}
}
if {$dorklist==""} {
putnot $nick "The Shitlist is empty."
return 0
}
foreach d $dorklist {
append list " " $d
}
putnot $nick "+---------------------------------------------------------+"
putnot $nick " Handle | Reason for getting on Shitlist."
set fart "[llength $list]"
set count "0"
while {$count < $fart} {
set nam "[lindex $list $count]"
set reas "[getxtra $nam]"
set length [string length $nam]
# your just dying to know why I spent time making the list
# look like this ain't you?? looks fresh..
if {$reas=="yOU hAVE bEEN sHITTED oN"} { set reas "None." }
if {$reas==""} { set reas "None." }
if {$length=="9"} { set name "$nam |" }
if {$length=="8"} { set name "$nam |" }
if {$length=="7"} { set name "$nam |" }
if {$length=="6"} { set name "$nam |" }
if {$length=="5"} { set name "$nam |" }
if {$length=="4"} { set name "$nam |" }
if {$length=="3"} { set name "$nam |" }
if {$length=="2"} { set name "$nam |" }
if {$length=="1"} { set name "$nam |" }
putnot $nick " $name $reas"
incr count 1
}
putnot $nick "+-----------+-------------------------------------------+"
putnot $nick "`---| Currently \[$fart\] People on the shitlist"
return 1
}
# !shitcmt
proc pub_shitcmt {nick uhost hand chan arg} {
global char
set dork [lindex $arg 0]
set comment [lrange $arg 1 end]
if {$dork==""} {
putnot $nick "Usage: ${char}shitcmt <shitnick> <shitcomment>"
return 0
}
if {$comment==""} {
if {[validuser $dork]} {
if {![matchattr $dork 3]} {
putnot $nick "$dork is not on the shitlist"
return 0
}
set dorkcmt [getxtra $dork]
if {$dorkcmt==""} { set dorkcmt None. }
if {$dorkcmt=="yOU hAVE bEEN sHITTED oN"} { set dorkcmt None. }
putnot $nick "$dork's shitlist comment is: $dorkcmt"
putnot $nick "To change the above comment use !shitcmt <nick> <comment>"
}
if {![validuser $dork]} {
putnot $nick "Sorry $dork is not known to me"
return 0
}
return 0
}
if {![validuser $dork]} {
putnot $nick "$dork is not known to me"
return 0
}
if {![matchattr $dork 3]} {
putnot $nick "$dork is not on my shitlist"
return 0
}
if {[setxtra $dork $comment]=="0"} {
putnot $nick "Shit fucked up .."
return 0
}
putnot $nick "Changed $dork's shitlist comment to: $comment"
return 1
}
# !save
proc pub_save {nick uhost hand chan rest} {
save
return 1
}
# !info <info>
proc pub_info {nick uhost hand chan arg} {
global char
if {$arg == ""} {
putnot $nick "Usage: ${char}info <info>"
return 0
}
if {$hand=="*"} {
putnot $nick "You are not a valid bot user"
return 0
}
setinfo $hand $arg
putnot $nick "User info now set to: [getinfo $hand] <rB!>"
save
return 1
}
# !chinfo
proc pub_chinfo {nick uhost hand chan arg} {
global char
if {$arg == ""} {
putnot $nick "Usage: ${char}chinfo <handle> \[info\]"
return 0
}
set handl [lindex $arg 0]
set cmt [lrange $arg 1 end]
if {![validuser $handl]} {
putnot $nick "$handl is not known to me"
return 0
}
set getinfo [getinfo $handl]
if {$cmt==""} {
putnot $nick "$handl's current info is: $getinfo"
return 0
}
setinfo $handl $cmt
putnot $nick "$handl's new info is: $cmt"
return 1
}
# !quote / !comment
proc pub_comment {nick uhost hand chan arg} {
global char
set who "$hand"
set quote "$arg"
set userquote [setcomment $who $quote]
if {$arg == ""} {
putnot $nick "Usage: ${char}quote <little quote>"
return 0
}
if {$userquote == "*"} {
putnot $nick "it fucked up somewhere =( <rB!>"
return 0
}
putnot $nick "Quote set to: $quote <rB!>"
save
return 0
}
# !email
proc pub_email {nick uhost hand chan arg} {
global channel char
set who "$hand"
set msg "$arg"
set email [setemail $who $msg]
if {$arg == ""} {
putnot $nick "Usage: ${char}email <email address>"
return 0
}
if {$email == "*"} {
putnot $nick "Didn't seem to work =( <rB!>"
return 0
}
putnot $nick "Your E-mail address set on bot is now: $msg <rB!>"
save
return 1
}
# !whois <nick>
proc pub_whois {nick uhost hand chan arg} {
global ver char
if {$arg==""} {
putnot $nick "Usage: ${char}whois <nick>"
return 0
}
set w [lindex $arg 0]
set w2 $w
set q [lindex $arg 1]
set realnick 1
set valid [chattr $w]
if {$valid=="*"} {
if {![onchan $w $chan]} {
putchan $chan "$w ? who that is? I dunno his punkass."
return 0
} else {
append userhost $w "!" [getchanhost $w $chan]
set target [finduser $userhost]
if {$target!="*"} {
set realnick 0
set w $target
} else {
putchan $chan "$w ? who that is? I dunno his punkass." ; return 0
} } }
set info [getinfo $w]
set comment [getcomment $w]
set email [getemail $w]
set laston [getlaston $w]
set last [ctime $laston]
set idle " [getchanidle $w $chan] "
set min "minutes" ; if {$idle==" 1 "} { set min "minute" }
if {$idle==" 0 "} {
set min " User is not idle."
set idle ""
}
if {$info == ""} { set info "None." }
if {$comment == ""} { set comment "None."}
if {$email == ""} { set email "None."}
if {$q==""} {
if {$realnick == "1"} {
putchan $chan "+----------($w's info)---- --- -- - -"
} else {
putchan $chan "+----------($w\(current nick $w2\) info)-- - -"
}
putchan $chan "|iNFO: $info"
putchan $chan "|cOMMENT: $comment"
putchan $chan "|eMAiL: $email"
if {[handonchan $w $chan]} { putchan $chan "|iDLE-TiME:$idle$min" }
putchan $chan "|uSER-fLAGS: +[chattr $w]"
if {![handonchan $w $chan]} { putchan $chan "|lAST-oN: $last" }
putchan $chan "+<rB! $ver> (Type !whelp for help on setting whois info) -"
} else {
if {$realnick=="1"} {
putchan $chan "($w) - info: $info comment: $comment"
} else { putchan $chan "(\002$w\002\[current nick $w2\]) \002-\002 info: \002$info\002 comment: \002$comment\002" }
putchan $chan "email: $email user-flags: +[chattr $w]"
return 0
}
return 1
}
# !usernumber
proc pub_usernum {nick uhost hand chan rest} {
set users [countusers]
putserv "PRIVMSG $chan :\001ACTION has a total of \[$users\] users on the bot <rB!>\001"
return 1
}
# !chaninfo
proc pub_chaninfo {nick uhost hand chan arg} {
global chanmode
set banlist [chanbans $chan]
set leetlist [chanlist $chan]
set number [llength $leetlist]
set channmode [getchanmode $chan]
if {$banlist == ""} { set banlist "None." }
putnot $nick "+---------($chan info)--- -- - -"
putnot $nick "|User's: There are currently \[$number\] ppl on $chan"
putnot $nick "|Channel-Modes: The channel modes are \[$channmode\]"
putnot $nick "|Bans: $banlist"
putnot $nick "`------------ --- -- - -" ; return 1 }
# !addban <hostmask>
proc pub_addban {nick uhost hand chan arg} {
global char
if {$arg == ""} {
putnot $nick "Usage: ${char}addban <hostmask>"
return 0
}
if {$arg=="*!*@*"} { putnot $nick "You must think i am dum right?"
putserv "PRIVMSG $chan :Hahah $nick thinks i would ban all of irc"
putserv "PRIVMSG $chan :Maybe i'll just ban him what do you think?"
return 0
}
set ban "$arg"
putserv "MODE $chan +b $ban"
newchanban $chan $ban $hand none 60
putnot $nick "Set ban on banmask: \[$ban\] <rB!>"
return 1
}
# !addpermban <hostmask>
proc pub_addpermban {nick uhost hand chan arg} {
global char
if {$arg == ""} {
putnot $nick "Usage: ${char}addpermban <hostmask>"
return 0
}
if {$arg=="*!*@*"} { putnot $nick "You must think i am dum right?"
putserv "PRIVMSG $chan :Hahah $nick thinks i would ban all of irc"
putserv "PRIVMSG $chan :Maybe i'll just ban him what do you think?"
return 0
}
set ban "$arg"
putserv "MODE $chan +b $ban"
newchanban $chan $ban $hand none 0
putnot $nick "Set permban on banmask: \[$ban\] <rB!>"
return 1
}
# !bans
proc pub_banlist {nick uhost hand chan arg} {
set banlist [chanbans $chan]
if {$banlist == ""} {
putnot $nick "There are currently no bans in $chan <rB!>"
return 0
}
putnot $nick "Current bans are:"
putnot $nick "$banlist"
return 1
}
# !away <reason>
proc pub_away {nick uhost hand chan arg} {
set awaymsg "$arg"
putserv "AWAY :$awaymsg"
putserv "PRIVMSG $chan :\001ACTION is away - $awaymsg\001"
return 1
}
# !back <reason>
proc pub_back {nick uhost hand chan arg} {
set backmsg "$arg"
putserv "AWAY :$backmsg"
putserv "PRIVMSG $chan :\001ACTION is back - $backmsg\001"
return 1
}
# ---- -- - - dcc autoidle junk
if {![info exists idletimer]} {
set idletimer [timer 1 dcc_autoaway]
}
proc dcc_autoaway {} {
global idlelimit idletimer
foreach dork [dcclist] {
if {([getdccidle [lindex $dork 0]] >= [expr $idlelimit * 60]) && ([getdccaway [lindex $dork 0]] == "")} {
setdccaway [lindex $dork 0] "autoaway\[\002rB!\002\] - after idle for $idlelimit minutes"
}
}
set idletimer [timer 1 dcc_autoaway]
}
proc killdcc_autoaway {hand idx shit} {
global idletimer
killtimer $idletimer
unset idletimer
return 1
}
bind dcc m killidle killdcc_autoaway
proc startdcc_autoaway {hand idx shit} {
global idletimer
if {[info exists idletimer]} {
putdcc $idx "I detect the dcc idle autoaway is on already"
return 0
}
set idletimer [timer 1 dcc_autoaway]
}
bind dcc m startidle startdcc_autoaway
#-- end dcc autoaway shit
# !help
proc pub_help {nick uhost hand chan arg} {
global ver char
if {$arg==""} { set arg none }
set shit [string tolower $arg]
switch $shit {
none { putnot $nick "+ ---------( rUPTbOT $ver bY eRUPT )--------- +"
putnot $nick " Usage: ${char}help <topic>"
putnot $nick " available help topics are: version topic mhelp"
putnot $nick " time annoy seen op away back test whelp utils lthelp"
putnot $nick "+ --------- ----- --- - -"
return 0 }
version { putnot $nick " Tells you the version of this ruptbot" ; return 0 }
topic { putnot $nick " Lets you make the bot set the channel topic" ; return 0 }
time { putnot $nick " Tells you the time and date" ; return 0 }
annoy { putnot $nick " Bot will send some1 5 annoying msgs ; return 0 }
seen { putnot $nick " Tells you the last that person was in the channel" ; return 0 }
op { putnot $nick " Ops selected nicks <more than one can be listed" ; return 0 }
away { putnot $nick " Bot sets himself away under your selected msg" ; return 0 }
back { putnot $nick " Bot announces he is back and if he was away will no longer be away" ; return 0 }
test { putnot $nick " Tests the bot j0nx." ; return 0 }
whelp { putnot $nick " Personal options and whois commands are listed to you" ; return 0 }
mhelp { putnot $nick " Help for bot masters and dorks like that" ; return 0 }
utils { putnot $nick " Shows bots miscealaneaous util commands" ; return 0 } }
putnot $nick "$arg is not a valid help topic it appears to me"
return 0
}
# !mhelp
proc pub_help2 {nick uhost hand chan arg} {
global ver char
if {$arg==""} { set arg none }
set shit [string tolower $arg]
switch $shit {
none { putnot $nick "+- ------------( rUPTbOT $ver by eRUPT )------------- -+"
putnot $nick " Usage: ${char}mhelp <topic>"
putnot $nick " available topics are : add +user addbot del chattr chinfo"
putnot $nick " addhost delhost gethost save shitlist unshit shitted shitcmt startidle killidle" ; return 0 }
add { putnot $nick " Add's user to the bot if he is not already on it" ; return 0 }
+user { putnot $nick " Lets you add a user and add your own hostmask w/o user on the channel" ; return 0 }
addbot { putnot $nick " Add a bot to the user list " ; return 0 }
del { putnot $nick " Delete's user from the bot if he is on it" ; return 0 }
chattr { putnot $nick " Lets you change the users flags for a user" ; return 0 }
chinfo { putnot $nick " Lets you change a users greet info " ; return 0 }
addhost { putnot $nick " Lets you add host to the users hostmask list" ; return 0 }
delhost { putnot $nick " Deletes specified hostmask from users list" ; return 0 }
gethost { putnot $nick " Gives you list of all the hostmasks on the users list" ; return 0 }
shitlist { putnot $nick " Adds user to the bots shitlist which will bankick"
putnot $nick " the user from the current channel whenever he joins" ; return 0 }
unshit { putnot $nick " Deletes the user from the shitlist " ; return 0 }
shitted { putnot $nick " Full list of all the shitlisted ppl on the bot" ; return 0 }
shitcmt { putnot $nick " Lets you see/change the current shitlist comment"
putnot $nick " for the specified user" ; return 0 }
save { putnot $nick " Save's user file" ; return 0 }
killidle { putnot $nick " kills the dcc autoaway feature" ; return 0 }
startidle { putnot $nick " Starts the dcc autoaway feature" ; return 0 } }
putnot $nick "$arg is not a valid topic on this helplist most likely"
return 0
}
# !utils/!utilz
proc pub_help3 {nick uhost hand chan arg} {
global ver char
if {$arg==""} { set arg none }
set shit [string tolower $arg]
switch $shit {
none { putnot $nick "+- ------------( rUPTbOT $ver by eRUPT )------------- -+"
putnot $nick " Usage: ${char}utils <topic> "
putnot $nick " available topics are : kick bk"
putnot $nick " permbk addban banlist cleanup"
putnot $nick " supercleanup usernumber" ; return 0 }
kick { putnot $nick " Bot kicks someone on current channel" ; return 0 }
bk { putnot $nick " Temporary bans and kicks a user" ; return 0 }
permbk { putnot $nick " Permanently bans and kicks a user" ; return 0 }
addban { putnot $nick " Add's a permanent ban to the bot" ; return 0 }
bans { putnot $nick " Show's you the current bans on channel" ; return 0 }
cleanup { putnot $nick " Kicks all nonops/voices<must not have either ops or v>" ; return 0 }
supercleanup{ putnot $nick " Not to be Played with kids. " ; return 0 }
usernumber { putnot $nick " Shows number of bot users " ; return 0 } }
putnot $nick "$arg is not a valid topic on this helplist most likely"
return 0
}
# !whelp
proc pub_help4 {nick uhost hand chan arg} {
global ver char
if {$arg==""} { set arg none }
set shit [string tolower $arg]
switch $shit {
none { putnot $nick "+- ------------( rUPTbOT $ver by eRUPT )------------- -+"
putnot $nick " Usage: ${char}whelp <topic> "
putnot $nick " available topics are : whois info quote email" ; return 0 }
whois { putnot $nick " Gives you whois info on user if he exists" ; return 0 }
info { putnot $nick " command to set your greet info on the bot" ; return 0 }
quote { putnot $nick " Set's your very own quote on the bots userfile" ; return 0 }
email { putnot $nick " Set's your e-mail address on the bots userfile" ; return 0 } }
putnot $nick "$arg is not a valid topic on this helplist most likely"
return 0
}
proc binds {newchar first} {
global char
set oldchar $char
set char "[string index $newchar 0]"
if {$first} {
dobinds un $oldchar
}
dobinds "" $char
return 1
}
proc dobinds {un char} {
${un}bind pub - ${char}whelp pub_help4
${un}bind pub - ${char}utils pub_help3
${un}bind pub m ${char}mhelp pub_help2
${un}bind pub - ${char}help pub_help
${un}bind pub o ${char}back pub_back
${un}bind pub o ${char}away pub_away
${un}bind pub o ${char}bans pub_banlist
${un}bind pub m ${char}addpermban pub_addpermban
${un}bind pub o ${char}match pub_match
${un}bind pub m ${char}addban pub_addban
${un}bind pub - ${char}heard pub_heard
${un}bind pub - ${char}myquit pub_myquit
${un}bind pub - ${char}chaninfo pub_chaninfo
${un}bind pub - ${char}usernumber pub_usernum
${un}bind pub - ${char}whois pub_whois
${un}bind pub - ${char}email pub_email
${un}bind pub - ${char}comment pub_comment
${un}bind pub m ${char}addchantemp add_channel_temp
${un}bind pub m ${char}addchanperm add_channel_perm
${un}bind pub m ${char}delchantemp del_channel_temp
${un}bind pub m ${char}delchanperm del_channel_perm
${un}bind pub m ${char}addmodestemp add_modes_temp
${un}bind pub m ${char}addmodesperm add_modes_perm
${un}bind pub m ${char}chinfo pub_chinfo
${un}bind pub - ${char}info pub_info
${un}bind pub m ${char}save pub_save
${un}bind pub m ${char}shitcmt pub_shitcmt
${un}bind pub - ${char}shitted pub_shitted
${un}bind pub m ${char}unshit pub_noshit
${un}bind pub m ${char}shitlist pub_shit
${un}bind pub m ${char}gethost pub_gethost
${un}bind pub m ${char}delhost pub_delhost
${un}bind pub m ${char}addhost pub_addhost
${un}bind pub m ${char}chattr pub_chattr
${un}bind pub m ${char}del pub_del
${un}bind pub m ${char}addvoice pub_add2
${un}bind pub m ${char}addbot pub_addbot
${un}bind pub m ${char}+user pub_+user
${un}bind pub m ${char}add pub_add
${un}bind pub m ${char}permbk pub_permbk
${un}bind pub o ${char}bk pub_bk
${un}bind pub o ${char}fuck pub_bk
${un}bind pub m ${char}supercleanup pub_kick3
${un}bind pub m ${char}cleanup pub_kick2
${un}bind pub o ${char}annoy pub_annoy
${un}bind pub o ${char}test pub_test
${un}bind pub o ${char}seen pub_seen
${un}bind pub o ${char}kick pub_kick
${un}bind pub m ${char}mode pub_mode
${un}bind pub - ${char}time pub_time
${un}bind pub o ${char}topic3 pub_topic3
${un}bind pub o ${char}topic2 pub_topic2
${un}bind pub o ${char}topic1 pub_topic1
${un}bind pub o ${char}topic pub_topic
${un}bind pub - ${char}version pub_version
${un}bind pub m ${char}setup pub_setup
${un}bind pub m ${char}ltopic topic_lock
${un}bind pub m ${char}ultopic topic_unlock
${un}bind pub - ${char}ltstat topic_status
${un}bind pub - ${char}lthelp topic_help
return 1
}
bind pub m ${char}char pub_char
proc pub_char {nick uhost hand chan arg} {
global char
if {$arg == ""} {
putnot $nick "Usage: !char <new prefix character for commands>"
return 0
}
binds [lindex $arg 0] 1
set char [lindex $arg 0]
return 1
}
binds $char 0
putlog "rUPT bAWT! $ver bY eRUPT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment