# Script : ActiveChan v1.00 by David Proper (Dr. Nibble [DrN])
# Copyright 2001 Radical Computer Systems
#
# Original
# Platform : Linux 2.0.33
# Eggdrop v1.2.0+bel1
# Current
# Platforms : Linux 2.2.16
# Eggdrop v1.6.2
# And : SunOS 5.8
# Eggdrop v1.5.4
#
# Description : ActiveCh will let a DCC user set thier active console
# channel to any channel the bot is on that they have
# access to. This is usefull for people who want to
# rebind the .console command to +n or unbind it for
# security/etc issues.
#
# History : 03/23/2001 - First Release
#
#
# Future Plans : Unknown. Make a suggestion.
#
# Author Contact : Email - DProper@bigfoot.com
# Home Page - http://home.earthlink.net/~daproper
# IRC - Nick: DrN UnderNet/DALnet
#
# Chaotix.Net is currentlly offline. Should return no later then Jan 1st, 2002
#
# Radical Computer Systems - http://www.chaotix.net/rcs/
# To subscribe to the RCS mailing list: mail majordomo@chaotix.net and in
# BODY of message, type subscribe rcs-list
#
# Feel free to Email me any suggestions/bug reports/etc.
#
# You are free to use this TCL/script as long as:
# 1) You don't remove or change author credit
# 2) You don't release it in modified form. (Only the original)
#
# If you have a "too cool" modification, send it to me and it'll be
# included in the official release. (With your credit)
#
# Commands Added:
# Where F CMD F CMD F CMD F CMD
# ------- - --------- - ----------- - ---------- - --------- - -------
# Public: - N/A
# MSG: - N/A
# DCC: - activechan
#
# Public Matching: N/A
#
#\
# |##### NOTE: Anything on the Chaotix.Net domain is currently offline
# |##### until we move. (Wife's in college, taking all our money)
# |##### Email me at dproper@bigfoot.com if you want to help.
#/
set activechanver "v1.00"
bind dcc - activechan dcc_activechan
proc dcc_activechan {handle idx arg} {
global botnick
set channel [lindex $arg 0]
if {$channel == ""} {putdcc $idx "Calling Syntax: .activechan #channel"
return 1}
set ulvl 0
if {([matchattr $handle o] == 0) && ([matchchanattr $handle o $channel] == 0)} {putdcc $idx "You are not +o for this channel."
return 0}
if {[onchan $botnick $channel]} {
set reply [console $idx $channel]
putdcc $idx "Active Channel is $reply"
} else {
putdcc $idx "Sorry, I don't seem to be on $channel"
}
}
return "ActiveChan $activechver by David Proper (DrN)"