Thread: [SithNet-Patches] [CVS] Module gnuworld-sithnet: Change committed
Brought to you by:
darthsidious_
From: Tim I. <dar...@us...> - 2003-08-18 21:28:52
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-18 21:28:51 UTC Added files: mod.lightweight/README Log message: Initial Import ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.lightweight/README diff -u /dev/null gnuworld-sithnet/mod.lightweight/README:1.1 --- /dev/null Mon Aug 18 14:28:52 2003 +++ gnuworld-sithnet/mod.lightweight/README Mon Aug 18 14:28:41 2003 @@ -0,0 +1,5 @@ +Nothing here yet, eventually this is intended to be a smaller, more +compact version of the current mod.cservice implementation, most likely +highly based on the current cservice module. +The first version put here will be almost the same as the current +inplementation, but with less commands and features. ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-20 16:25:49
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-20 15:40:45 UTC Modified files: ChangeLog.sithnet Log message: Added a few config options related to VERIFYCommand, read changelog.sithnet for info ---------------------- diff included ---------------------- Index: gnuworld-sithnet/ChangeLog.sithnet diff -u gnuworld-sithnet/ChangeLog.sithnet:1.1.1.1 gnuworld-sithnet/ChangeLog.sithnet:1.2 --- gnuworld-sithnet/ChangeLog.sithnet:1.1.1.1 Mon Aug 18 13:27:30 2003 +++ gnuworld-sithnet/ChangeLog.sithnet Wed Aug 20 08:40:35 2003 @@ -1,3 +1,17 @@ +2003-08-20 Tim Ireland <dar...@us...> + * mod.cservice/cservice.cc mod.cservice/cservice.h + mod.cservice/cservice_Config.h mod.cservice/responses.h + mod.cservice/levels.h mod.cservice/VERIFYCommand.cc + bin/cservice.example.conf ChangeLog.sithnet: + Modified VERIFYCommand so show more access levels, the basic 3 + for cservice kinda sucked. Added officialChan - loaded via + config, used in VERIFYCommand to show a users 'official' status. + Added fedsChan - again, loaded via config, usefull if your + network has a 'feds helper' scheme. + Lowered invite to 24, 100 is way too high. + changed SET NOFORCE to be a *1000 command, otherwise any senior + cs admin could mess around with 'off-limit' channels. + 2003-08-18 Tim Ireland <dar...@us...> * src/Channel.cc, src/server.cc, libircu/msg_M.cc, include/server.h, include/client.h, include/Channel.h: ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-20 16:30:14
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-20 14:05:25 UTC Added files: bin/ccontrol.example.conf bin/clientExample.example.conf bin/cloner.example.conf bin/cservice.example.conf bin/dronescan.example.conf bin/gnutest.example.conf bin/nickserv.example.conf bin/scanner.example.conf bin/stats.example.conf Log message: Uploaded Example configuration files ---------------------- diff included ---------------------- Index: gnuworld-sithnet/bin/ccontrol.example.conf diff -u /dev/null gnuworld-sithnet/bin/ccontrol.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/ccontrol.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,79 @@ +# $Id: ccontrol.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# conf file for testClient + +# database specifications +sql_host = 127.0.0.1 +sql_port = 5432 + +# sql_db = Name of the database. + +sql_db = ccontrol + +#if you dont need user/pass just leave it with '' +sql_user = dan +sql_pass = foo + +# The following fields are required +username = UWorld +nickname = UWorld +hostname = SithNet.org +userdescription = UWorld Operator Services + +operchanmodes = +sntcCO +mode = +iodkw + +# make sure channel names are preceeded +# by the '#' character +operchan = #DarkSide + +# msgchan is also an operchan +msgchan = #UWorld + +# Default gline length (in seconds) +glength = 3600 + +# Default reason for adding an oper chan +operchanreason = This is now an IRC Operator only channel + +# report specification + +# abuse_mail - the email that the report should be emailed to +abuse_mail = ab...@yo... + +# ccemail - the email that ccontrol will put in the from field +# of the report +ccemail = uwo...@yo... + +# sendmail - full path to the sendmail program +sendmail = /usr/sbin/sendmail + +# mail_report - set 1 for the bot to mail the report +# set to 0 if you dont want a report to be mailed +mail_report = 0 + +# gline_interval - the interval in which ccontrol should check +# for expired glines +gline_interval = 3600 + +# max_connection - the maximum connections a host can have before glined +max_connection = 5 + +# max_GLen - the length of the gline the for excessive +# connection (in seconds) +max_GLen = 86400 + +# max_threads - maximum number of gate checking threads to start +max_threads = 100 + +# check_gates - set 1 for the bot to check for open gates, or 0 for not +check_gates = 0 + +# check_clones - set 1 for the bot to check for clones, or 0 for not +check_clones = 0 + +# Expired_Interval +Expired_interval = 60 + +# dbinterval +dbinterval = 60 + Index: gnuworld-sithnet/bin/clientExample.example.conf diff -u /dev/null gnuworld-sithnet/bin/clientExample.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/clientExample.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,8 @@ +# $Id: clientExample.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# conf file for testClient +username = clientEx +nickname = clientEx +hostname = SithNet.org +userdescription = GNUWorld Test Client + +mode = +i Index: gnuworld-sithnet/bin/cloner.example.conf diff -u /dev/null gnuworld-sithnet/bin/cloner.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/cloner.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,66 @@ +# $Id: cloner.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# Configuration file for Cloner (mod.cloner) + +# The following fields pertain to the client that connects and +# provides an interface to the server +username = Cloner +nickname = Cloner +hostname = SithNet.org +userdescription = I am the clone man! + +# The mode for the cloning client +mode = +iodk + +# permit the given user -- by account login name -- to use the +# module. You may have as many of these as you like (including none). +# This is case-insensitive. +permit_user = reppir +permit_user = Darth + +# Set this to true if you want to permit opers to use the module, +# set to false otherwise (will not affect other users who have access) +allow_opers = true + +######## +# The following fields are information about the clones +# and the server created to host them. + +# The name of the server to which to connect the clones +fakeservername = spawn.undernet.org + +# The server description of the fake clone server +fakeserverdescription = Clones really are my bag baby! + +# fakehost's are used for clone host names +# There may be as many as you like +fakehost=this.is.a.fake.host.com +fakehost=whitehouse.gov +fakehost=cia.gov +fakehost=fbi.gov +fakehost=clone.fbi.gov +fakehost=i.hacked.cia.gov + +# fakeuser's are used for clone usernames +# There may be as many as you like +fakeuser=bill +fakeuser=mcnamara +fakeuser=hillary +fakeuser=mccain +fakeuser=gore +fakeuser=big_al + +# Real name field of each clone +clonedescription = This is a clone, this is only a clone... + +# Modes that each clone needs to set +clonemode = +d + +# The minimum length of a clone nickname +minnicklength = 5 + +# The maximum length of a clone nickname (default max on normal +# non-edited IRCu is 9) +maxnicklength = 15 + +# The max number of clones to burst on each iteration +cloneburstcount = 35 Index: gnuworld-sithnet/bin/cservice.example.conf diff -u /dev/null gnuworld-sithnet/bin/cservice.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/cservice.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,162 @@ +# $Id: cservice.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# Channel Services configuration file. +# +# sql_host = Hostname/IP of the PostgreSQL server. + +sql_host = 127.0.0.1 +sql_port = 5432 + +# sql_db = Name of the database. +# (To create from the template, run cservice.sql through Postgres) + +sql_db = cservice + +# sql_user is the username to pass to Postgres on connection. +# Usefull if your account name is not the same as your Database +# username. + +sql_user = dan +sql_pass = foo + +# General 'Bot' options. + +nickname = S +username = cservice +hostname = SithNet.org +userdescription = For help type: /msg S help +mode = +idk + +# +# Channel to relay flood/warnings/exceptions, etc. +# + +pending_page_url = http://www.yoursite.com/live/view_app.php + +relay_channel = #CMaster + +# +# Channel to relay useful debug information that otherwise +# annoy CS admins. :) +# + +debug_channel = #CMaster + +# +# Coder channel. +# +# Channel used to extract levels to display coder access status. + +coder_channel = #Coder-com + +# +# Frequency in seconds to check the database for updates. +# + +update_interval = 180 + +# +# Number of seconds to sample for flooding. +# + +flood_duration = 30 + +# +# Input flood rate. +# +# Eg: 30, for 30 points amassed within "flood_duration" seconds. +# + +input_flood = 30 + +# +# Output flood rate. +# +# Eg: 20480 (20k within "flood_duration" seconds). +# + +output_flood = 20480 + +# +# Minimum duration at which to set a topic in a non idle channel. +# (Seconds). +# + +topic_duration = 1800 + +# +# Duration at which we check for idle user accounts in memory. +# (Seconds). + +expire_interval = 3600 + +# +# How long those accounts should have been idle before they are +# uncached. (Seconds). +# + +cache_interval = 3600 + +# +# How often to notify/commit changes to Pending channels. +# (Seconds). + +pending_duration = 1800 + +# +# How often to check if the connection to the backend has +# fallen over? (Seconds). +# + +connection_check_frequency = 10 + +# +# How many times do we try every 'connection_check_frequency' seconds +# to reconnect before finally giving up and exiting? +# + +connection_retry_total = 5 + +# +# How often (in seconds) should we check all channels that have +# floating-limit set to see if they need a new limit setting? +# +# Note: 30 is a good value, try 1min if you have lots of chans +# and not so much CPU. + +limit_check = 30 + +# +# How long (In seconds) should we wait before allowing +# logins after startup. (Incase you're on a busy network +# with a really large burst and need things to settle down +# first to ease up load on the Db). +# + +login_delay = 30 + + +# +# What is the period (in seconds) in which we will check to +# see if someone has sent too many notes, and what do we +# define "Too Many" as? +# Ie: You can send 'note_limit' notes in 'note_duration' seconds. +# + +note_duration = 3600 +note_limit = 5 + +# +# Pre-cache 'x' days worth of user accounts. +# This lets you preload all the users who have logged in during the last +# 'x' number of days to avoid a large number of queries when processing +# +r accounts during the initial net.burst. +# + +preload_user_days = 1 + +# +# Specify the filename for the 'Admin Log'. +# Basically a log of all commands admins type. +# + +admin_logfile = admin.log Index: gnuworld-sithnet/bin/dronescan.example.conf diff -u /dev/null gnuworld-sithnet/bin/dronescan.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/dronescan.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,96 @@ +# $Id: dronescan.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# What nickname should the bot use? +nickname = DS + +# What username should the bot use? +username = dronescan + +# What hostname should the bot use? +hostname = SithNet.org + +# What should the bots real name be? +userdescription = SithNet Drone Scanner + +# What user modes should the bot use? +mode = +idk + +# Console channel name and initial modes +consoleChannel = #ds.console +consoleChannelModes = +ntsimcCO + +# SQL Setup +sqlHost = 127.0.0.1 +sqlPort = 5432 +sqlDB = dronescan +sqlUser = dronescan +sqlPass = "" + +# Margins +# Be careful with these. I wouldn't touch chanMargin too much but I suspect +# nickMargin will need tweaking from network to network. These defaults were +# taken from a fairly old burst from a small (2k5 user) network so beware! + +# The fraction of users who must be `abnormal' in a channel for the channel +# to be reported. +channelMargin = 0.8 + +# The margin around the average entropy within which a nickname is considered +# `normal'. Outside this margin is `abnormal'. Note this is the margin *either +# side* of the center, ie 0.25 would give a 50% spread - from 25% to 75%. +nickMargin = 0.1 + +# The channel cutoff is the minimum amount of members a channel must have before +# it can be considered a drone channel. +channelCutoff = 10 + +# The minimum level of information shown in the console channels. Available +# levels are as follows: +# 0 - DEBUG Random debug things that you very probably are not interested in +# 1 - INFO Informational things - this is usually worth seeing +# 2 - WARN Warnings about drone channels and serious events. +# 3 - ERROR DroneScan core errors. +consoleLevel = 1 + +# The minimum amount of votes needed for a channel to be considered abnormal +voteCutoff = 30 + +# The interval (in seconds) during which a channel won't be reported again +# This is to stop repeated spamming of the same channel +dcInterval = 600 + +################ +# JOIN COUNTER # +################ + +# The interval over which join counter checks for joins. This is in seconds. +jcInterval = 10 + +# The trigger level for which join counter warns. Note that the total join +# count must be OVER this level to trigger. +jcCutoff = 10 + + +################# +# CHANNEL RANGE # +################# + +# The total range of entropy in a channel before it is considered abnormal +channelRange = 0.2 + + +############ +# MAXCHANS # +############ + +# The minimum channel membership before a client in a channel is considered +# normal: +maxChans = 2 + + +############## +# COMMONREAL # +############## + +# The amount of users who must have the same realname before being considered +# abnormal. +realCutoff = 4 Index: gnuworld-sithnet/bin/gnutest.example.conf diff -u /dev/null gnuworld-sithnet/bin/gnutest.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/gnutest.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,10 @@ +# $Id: gnutest.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# conf file for testClient +username = gnutest +nickname = gnutest +hostname = SithNet.org +userdescription = GNUTest Test Client + +mode = +iokd + +operchan = #Valhalla Index: gnuworld-sithnet/bin/nickserv.example.conf diff -u /dev/null gnuworld-sithnet/bin/nickserv.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/nickserv.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,43 @@ +# $Id: nickserv.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +nickname = NS + +username = nickserv +hostname = SithNet.org +userdescription = GNUWorld Nickname Services +mode = +idk + +# Console output for nickserv +consoleChannel = #NS +consoleChannelModes = +ntsimcCO + +# DB connection configuration +dbHost = 127.0.0.1 +dbPort = 5432 +dbDb = nickserv +dbUser = nickserv +dbPass = "" + +# The frequency with which to check the queue +checkFreq = 60 + +# The initial startup wait. +# Note this does NOT include checkFreq so make sure to set +# a value somewhat higher than 0 +startDelay = 60 + +# How frequently to commit to the database +# _freq is max time to wait, _count is max entries to wait +commitFreq = 5 +commitCount = 1 + +# What level of debug stuff should be sent to the console channel? +# This is a bitfield, values as follows: +# 1 - PROTOCOL +# 2 - SQL +# 4 - DEBUG +# 8 - INFO +# 16 - WARNING +# 32 - ERROR +# Simply add the numbers together from the levels you want. +consoleLevel = 63 + Index: gnuworld-sithnet/bin/scanner.example.conf diff -u /dev/null gnuworld-sithnet/bin/scanner.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/scanner.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,11 @@ +# $Id: scanner.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# Config file for the scanner client +nickname = ForceScan +username = force +hostname = SithNet.org +userdescription = Don't be afraid, I won't hurt you... + +mode = +iok + +# The maximum number of outgoing connections to establish +max_connects = 1500 Index: gnuworld-sithnet/bin/stats.example.conf diff -u /dev/null gnuworld-sithnet/bin/stats.example.conf:1.1 --- /dev/null Wed Aug 20 07:05:25 2003 +++ gnuworld-sithnet/bin/stats.example.conf Wed Aug 20 07:05:14 2003 @@ -0,0 +1,27 @@ +# $Id: stats.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# conf file for stats bot +username = Statserv +nickname = Stats1 +hostname = SithNet.org +userdescription = SithNetNet Statistical Services + +mode = +iok + +# permit the given user -- by account login name -- to use the +# module. You may have as many of these as you like (including none). +# This is case-insensitive. +permit_user = Darth + +# Set this to true if you want to permit opers to use the module, +# set to false otherwise (will not affect other users who have access) +allow_opers = true + +# Set this value to "true" to enable stats logging during burst (it chews +# the hard drive/CPU) +logDuringBurst = false + +# Path to where you want output files to be placed +data_path = . + +part_message = Im too sexy for this channel + ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-20 17:35:28
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-20 15:33:14 UTC Modified files: mod.cservice/cservice.cc mod.cservice/cservice.h mod.cservice/cservice_config.h mod.cservice/VERIFYCommand.cc mod.cservice/levels.h mod.cservice/responses.h Log message: Added a few config options related to VERIFYCommand, read changelog.sithnet for info ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/VERIFYCommand.cc diff -u gnuworld-sithnet/mod.cservice/VERIFYCommand.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/VERIFYCommand.cc:1.2 --- gnuworld-sithnet/mod.cservice/VERIFYCommand.cc:1.1.1.1 Mon Aug 18 13:31:04 2003 +++ gnuworld-sithnet/mod.cservice/VERIFYCommand.cc Wed Aug 20 08:33:03 2003 @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: VERIFYCommand.cc,v 1.1.1.1 2003/08/18 20:31:04 darthsidious_ Exp $ + * $Id: VERIFYCommand.cc,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #include <string> @@ -27,7 +27,7 @@ #include "levels.h" #include "responses.h" -const char VERIFYCommand_cc_rcsId[] = "$Id: VERIFYCommand.cc,v 1.1.1.1 2003/08/18 20:31:04 darthsidious_ Exp $" ; +const char VERIFYCommand_cc_rcsId[] = "$Id: VERIFYCommand.cc,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" ; namespace gnuworld { @@ -62,8 +62,8 @@ bot->Notice(theClient, bot->getResponse(tmpUser, language::is_service_bot, - string("%s is an Official Undernet Service Bot.")).c_str(), - target->getNickName().c_str()); + string("%s is an Official SithNET Service's Client.")).c_str(), + target->getNickName().c_str()); return false; } @@ -76,7 +76,7 @@ if (target->isOper()) { extra = bot->getResponse(tmpUser, - language::is_also_an_ircop, " and an IRC operator"); + language::is_also_an_ircop, " and an IRC Operator"); } if (!theUser) @@ -86,7 +86,7 @@ bot->Notice(theClient, bot->getResponse(tmpUser, language::is_an_ircop, - string("%s is an IRC operator")).c_str(), + string("%s is an IRC Operator")).c_str(), target->getNickUserHost().c_str()); } else @@ -100,23 +100,12 @@ return false; } -sqlChannel* theChan = bot->getChannelRecord(bot->coderChan); -if (!theChan) - { - return true; - } +int aLevel = bot->getAdminAccessLevel(theUser); +int cLevel = bot->getCoderAccessLevel(theUser); +int oLevel = bot->getOfficialAccessLevel(theUser); +int fLevel = bot->getFedsAccessLevel(theUser); -// TODO: Move all the levels to constants in levels.h - -int level = bot->getAdminAccessLevel(theUser); -int cLevel; -if (!theChan) - cLevel = 0; -else - cLevel = bot->getEffectiveAccessLevel(theUser, theChan, false); - -cLevel = 0; -if ( (0 == level) && (0 == cLevel) ) +if ( (0 == aLevel) && (0 == cLevel) && (0 == oLevel) && (0 == fLevel) ) { bot->Notice(theClient, bot->getResponse(tmpUser, @@ -128,7 +117,7 @@ return false; } -if ((level >= level::admin::base) && (level <= level::admin::helper)) +if ((aLevel >= level::admin::helper) && (aLevel < level::admin::tadmin)) { bot->Notice(theClient, bot->getResponse(tmpUser, @@ -140,81 +129,295 @@ return true; } -if ((level > level::admin::helper) && (level <= level::admin::admin)) +if ((aLevel > level::admin::tadmin) && (aLevel < level::admin::jadmin)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_tadmin, + string("%s is an Official CService Trainee Administrator%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((aLevel > level::admin::jadmin) && (aLevel < level::admin::admin)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_jadmin, + string("%s is an Official CService Junior Administrator%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((aLevel >= level::admin::admin) && (aLevel < level::admin::supervisor)) { bot->Notice(theClient, bot->getResponse(tmpUser, language::is_cservice_admin, - string("%s is an Official CService Administrator%s and logged in as %s")).c_str(), + string("%s is an Official CService Senior Administrator%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -if ((level > level::admin::admin) && (level <= level::admin::coder)) +if ((aLevel > level::admin::supervisor) && (aLevel < level::admin::officer)) { bot->Notice(theClient, bot->getResponse(tmpUser, - language::is_cservice_dev, - string("%s is an Official CService Developer%s and logged in as %s")).c_str(), + language::is_cservice_sup, + string("%s is an Official CService Supervisor%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -/* -if ((cLevel >= level::coder::base) && (cLevel <= level::coder::contrib)) +if ((aLevel > level::admin::officer) && (aLevel < level::admin::coman)) { bot->Notice(theClient, bot->getResponse(tmpUser, - language::is_coder_rep, - string("%s is an Official Coder-Com Representative%s and logged in as %s")).c_str(), + language::is_cservice_officer, + string("%s is the Official CService Abuse Administrator%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((aLevel >= level::admin::coman) && (aLevel < level::admin::csmgr)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_co, + string("%s is the Official CService Co-Manager%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -if ((cLevel > level::coder::base) && (cLevel <= level::coder::contrib)) +if ((aLevel > level::admin::csmgr) && (aLevel < level::admin::director)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_mgr, + string("%s is an Official CService Manager%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((aLevel > level::admin::director) && (aLevel < level::admin::scoder)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_director, + string("%s is the Official CService Director%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((aLevel >= level::admin::scoder) && (aLevel < level::admin::manager)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_coder, + string("%s is an Official CService Senior Coder%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (aLevel == level::admin::coord) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_cservice_coord, + string("%s is the Official Channel Services Committee Coordinator%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + + + } +if ((cLevel >= level::coder::base) && (cLevel < level::coder::contrib)) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_coder_rep, + string("%s is an Official SithNet Coder-com Representative%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if ((cLevel >= level::coder::contrib) && (cLevel < level::coder::devel)) { bot->Notice(theClient, bot->getResponse(tmpUser, language::is_coder_contrib, - string("%s is an Official Coder-Com Contributer%s and logged in as %s")).c_str(), + string("%s is an Official SithNet Coder-com Contributer%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -if ((cLevel > level::coder::contrib) && (cLevel <= level::coder::devel)) +if ((cLevel >= level::coder::devel) && (cLevel < level::coder::senior)) { bot->Notice(theClient, bot->getResponse(tmpUser, language::is_coder_devel, - string("%s is an Official Coder-Com Developer%s and logged in as %s")).c_str(), + string("%s is an Official SithNet Coder-com Developer%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -if (cLevel > level::coder::devel) +if (cLevel >= level::coder::senior) { bot->Notice(theClient, bot->getResponse(tmpUser, language::is_coder_senior, - string("%s is an Official Coder-Com Senior%s and logged in as %s")).c_str(), + string("%s is an Official SithNet Coder-com Senior%s and logged in as %s")).c_str(), target->getNickUserHost().c_str(), extra.c_str(), theUser->getUserName().c_str()); return true; } -*/ -return true ; +if (oLevel == level::official::bot) + { + bot->Notice(theClient, "%s is an Official SithNet Bot%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel == level::official::helper) + { + bot->Notice(theClient, "%s is an Official SithNet Helper%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel == level::official::somehow) + { + bot->Notice(theClient, "%s is Somehow Official%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel = level::official::scoder) + { + bot->Notice(theClient, "%s is an Official SithNet Senior Coder%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel == level::official::admin) + { + bot->Notice(theClient, "%s is an Official IRC Administrator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel == level::official::senior) + { + bot->Notice(theClient, "%s is an Official Senior IRC Administrator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (oLevel == level::official::founder) + { + bot->Notice(theClient, "%s is the Official SithNet Network Administrator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (fLevel == level::feds::helper) + { + bot->Notice(theClient, "%s is an Official SithNet Fed's Helper%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (fLevel == level::feds::supervisor) + { + bot->Notice(theClient, "%s is the Official SithNet Fed's Supervisor%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (fLevel == level::feds::administrator) + { + bot->Notice(theClient, "%s is an Official SithNet IRC Administrator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (fLevel == level::feds::servadmin) + { + bot->Notice(theClient, "%s is an Official SithNet IRC Server Administrator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (fLevel == level::feds::mananger) + { + bot->Notice(theClient, "%s is the Official SithNet Oper-com Coordinator%s and logged in as %s", + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } + +if (((aLevel == level::admin::coord) && (oLevel == level::official::founder) && (fLevel == level::feds::manager) + { + bot->Notice(theClient, + bot->getResponse(tmpUser, + language::is_administrator, + string("%s is the Official SithNet Network Administrator and CService Coordinator%s and logged in as %s")).c_str(), + target->getNickUserHost().c_str(), + extra.c_str(), + theUser->getUserName().c_str()); + return true; + } } } // namespace gnuworld. Index: gnuworld-sithnet/mod.cservice/cservice.cc diff -u gnuworld-sithnet/mod.cservice/cservice.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/cservice.cc:1.2 --- gnuworld-sithnet/mod.cservice/cservice.cc:1.1.1.1 Mon Aug 18 13:30:43 2003 +++ gnuworld-sithnet/mod.cservice/cservice.cc Wed Aug 20 08:33:03 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.cc,v 1.1.1.1 2003/08/18 20:30:43 darthsidious_ Exp $ + * $Id: cservice.cc,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #include <new> @@ -271,6 +271,8 @@ relayChan = cserviceConfig->Require( "relay_channel" )->second ; debugChan = cserviceConfig->Require( "debug_channel" )->second ; coderChan = cserviceConfig->Require( "coder_channel" )->second ; +officialChan = cserviceConfig->Require( "official_channel" )->second ; +fedsChan = cserviceConfig->Require( "feds_channel" )->second ; pendingPageURL = cserviceConfig->Require( "pending_page_url" )->second ; updateInterval = atoi((cserviceConfig->Require( "update_interval" )->second).c_str()); expireInterval = atoi((cserviceConfig->Require( "expire_interval" )->second).c_str()); @@ -805,7 +807,7 @@ else if(Command == "VERSION") { xClient::DoCTCP(theClient, CTCP, - "Undernet P10 Channel Services II [" + "SithNet P10 Channel Services II [" __DATE__ " " __TIME__ "] Release 1.1pl13"); } @@ -1118,9 +1120,68 @@ return theLevel->getAccess(); } -// By default, users have level 0 admin access. +// By default, users have level 0 coder access. +return 0; +} + +/** + * Returns the 'Official' access level of a user + */ +short int cservice::getOfficialAccessLevel( sqlUser* theUser ) +{ +if (theUser->getFlag(sqlUser::F_GLOBAL_SUSPEND)) + { + return 0; + } + +sqlChannel* theChan = getChannelRecord(officialChan); +if (!theChan) + { + elog << "cservice::getOfficialAccessLevel> Unable to " + << "locate channel '" + << officialChan.c_str() + << "'! Sorry, I cant continue.." + << endl; + ::exit(0); + } +sqlLevel* theLevel = getLevelRecord(theUser, theChan); +if(theLevel) + { + return theLevel->getAccess(); + } +// By default, users have level 0 official access. return 0; } + +/** + * Returns the 'Feds' access level of a user + */ +short int cservice::getFedsAccessLevel( sqlUSer* theUser ) +{ +if (theUser->getFlag(sqlUser::F_GLOBAL_SUSPEND)) + { + return 0; + } + +sqlChannel* theChan = getChannelRecord(fedsChan); +if (!theChan) + { + elog << "cservice::getFedsAccessLevel> Unable to " + << "locate channel'" + << fedsChan.c_str() + <<"'! Sorry, I cant continue.." + << endl; + ::exit(0); + } +sqlLevel* theLevel = getLevelRecord(theUser, theChan); +if(theLevel) + { + return theLevel->getAccess(); + } +// By default, users have level 0 feds access. +return 0; +} + /** * Returns the access level a particular user has on a particular Index: gnuworld-sithnet/mod.cservice/cservice.h diff -u gnuworld-sithnet/mod.cservice/cservice.h:1.1.1.1 gnuworld-sithnet/mod.cservice/cservice.h:1.2 --- gnuworld-sithnet/mod.cservice/cservice.h:1.1.1.1 Mon Aug 18 13:30:44 2003 +++ gnuworld-sithnet/mod.cservice/cservice.h Wed Aug 20 08:33:03 2003 @@ -17,11 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $ + * $Id: cservice.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #ifndef __CSERVICE_H -#define __CSERVICE_H "$Id: cservice.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $" +#define __CSERVICE_H "$Id: cservice.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" #include <string> #include <vector> @@ -178,6 +178,14 @@ /* Returns what access a user has in the coder channel */ short getCoderAccessLevel( sqlUser* ); + /* Returns what 'official' access a user has. */ + short getOfficialAccessLevel( sqlUser* ); + + /* Returns what 'feds'access level a user has - usefull if your network has + * a #feds helper system and wants helpers to be easily identified + */ + short getFedsAccessLevel( sqlUser* ); + /* Fetch a user record for a user. */ sqlUser* getUserRecord( const string& ); @@ -272,9 +280,12 @@ // Flood/Notice relay channel - Loaded via config. // Added coderChan - Loaded via config. + // officialChan + fedsChan added - Loaded via config. string relayChan; string debugChan; string coderChan; + string officialChan; + string fedsChan; // Loaded via config. // Interval at which we pick up updates from the Db. Index: gnuworld-sithnet/mod.cservice/cservice_config.h diff -u gnuworld-sithnet/mod.cservice/cservice_config.h:1.1.1.1 gnuworld-sithnet/mod.cservice/cservice_config.h:1.2 --- gnuworld-sithnet/mod.cservice/cservice_config.h:1.1.1.1 Mon Aug 18 13:30:44 2003 +++ gnuworld-sithnet/mod.cservice/cservice_config.h Wed Aug 20 08:33:03 2003 @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice_config.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $ + * $Id: cservice_config.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #ifndef __CSERVICE_CONFIG_H -#define __CSERVICE_CONFIG_H "$Id: cservice_config.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $" +#define __CSERVICE_CONFIG_H "$Id: cservice_config.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" /** * Define this if you wish for all SQL queries to be sent @@ -43,18 +43,18 @@ * The maximum number of results to return to the user on * an LBANLIST query. */ -#define MAX_LBAN_RESULTS 10 +#define MAX_LBAN_RESULTS 20 /** * The maximum number of results to return to the user on * an ACCESS query. */ -#define MAX_ACCESS_RESULTS 15 +#define MAX_ACCESS_RESULTS 25 /** * The maximum number of search results to return to the user. */ -#define MAX_SEARCH_RESULTS 10 +#define MAX_SEARCH_RESULTS 20 /** * Do you want NEWPASS command or not? Index: gnuworld-sithnet/mod.cservice/levels.h diff -u gnuworld-sithnet/mod.cservice/levels.h:1.1.1.1 gnuworld-sithnet/mod.cservice/levels.h:1.2 --- gnuworld-sithnet/mod.cservice/levels.h:1.1.1.1 Mon Aug 18 13:30:45 2003 +++ gnuworld-sithnet/mod.cservice/levels.h Wed Aug 20 08:33:03 2003 @@ -21,11 +21,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: levels.h,v 1.1.1.1 2003/08/18 20:30:45 darthsidious_ Exp $ + * $Id: levels.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #ifndef __LEVELS_H -#define __LEVELS_H "$Id: levels.h,v 1.1.1.1 2003/08/18 20:30:45 darthsidious_ Exp $" +#define __LEVELS_H "$Id: levels.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" namespace gnuworld { @@ -53,7 +53,7 @@ const int deop = 100; const int op = 100; - const int invite = 100; + const int invite = 24; // lowered from 100 const int suspend = 100; const int unsuspend = 100; @@ -66,7 +66,7 @@ const int remuser = 400; const int join = 450; - const int part = 500; + const int part = 450; const int setcmd = 450; const int logs = 501; // Level that logs are visible at @@ -114,7 +114,7 @@ const int special = 750; const int noreg = 750; const int neverreg = 750; - const int noforce = 750; + const int noforce = 1000; const int suspend = 501; const int tempman = 501; const int caution = 501; @@ -128,17 +128,44 @@ } namespace admin { - const int base = 1; - const int helper = 500; - const int admin = 949; - const int coder = 1000; + const int helper = 1; + const int tadmin = 300; + const int jadmin = 500; + const int admin = 750; + const int supervisor = 775; + const int officer = 800; + const int coman = 850; + const int csmgr = 900; + const int director = 950; + const int scoder = 960; + const int coord = 1000; + } + + namespace official { + const int helper = 1; + const int bot = 25; + const int somehow = 50; + const int scoder = 300; + const int admin = 400; + const int senior = 450; + const int founder = 500; + } + + namespace feds { + const int bot = 1; + const int helper = 24; + const int supervisor = 200; + const int oper = 300; + const int administrator = 400; + const int servadmin = 450; + const int manager = 500; } namespace coder { const int base = 1; const int contrib = 200; const int devel = 400; - const int senior = 499; + const int senior = 450; } } Index: gnuworld-sithnet/mod.cservice/responses.h diff -u gnuworld-sithnet/mod.cservice/responses.h:1.1.1.1 gnuworld-sithnet/mod.cservice/responses.h:1.2 --- gnuworld-sithnet/mod.cservice/responses.h:1.1.1.1 Mon Aug 18 13:30:58 2003 +++ gnuworld-sithnet/mod.cservice/responses.h Wed Aug 20 08:33:03 2003 @@ -22,11 +22,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: responses.h,v 1.1.1.1 2003/08/18 20:30:58 darthsidious_ Exp $ + * $Id: responses.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ */ #ifndef __RESPONSES_H -#define __RESPONSES_H "$Id: responses.h,v 1.1.1.1 2003/08/18 20:30:58 darthsidious_ Exp $" +#define __RESPONSES_H "$Id: responses.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" namespace gnuworld { @@ -185,9 +185,6 @@ const int is_an_ircop = 147; const int is_not_logged_in = 148; const int logged_in_as = 149; - const int is_cservice_rep = 150; - const int is_cservice_admin = 151; - const int is_cservice_dev = 152; const int exc_search = 153; const int restrict_search = 154; const int no_search_match = 155; @@ -211,6 +208,24 @@ const int noforce_set = 176; const int greeting = 9998; const int motd = 9999; + //cservice etc responses start + const int is_cservice_rep = 200; + const int is_cservice_tadmin = 201; + const int is cservice_jadmin = 202; + const int is_cservice_admin = 203; + const int is_cservice_sup = 204; + const int is_cservice_officer = 205; + const int is_cservice_co = 206; + const int is_cservice_mgr = 207; + const int is_cservice_director = 208; + const int is_cservice_coder = 209; + const int is_cservice_coord = 210; + const int is_administrator = 211; + + + + + } } ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-20 17:44:40
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-20 15:33:47 UTC Modified files: bin/cservice.example.conf Log message: Added a few config options related to VERIFYCommand, read changelog.sithnet for info ---------------------- diff included ---------------------- Index: gnuworld-sithnet/bin/cservice.example.conf diff -u gnuworld-sithnet/bin/cservice.example.conf:1.1 gnuworld-sithnet/bin/cservice.example.conf:1.2 --- gnuworld-sithnet/bin/cservice.example.conf:1.1 Wed Aug 20 07:05:14 2003 +++ gnuworld-sithnet/bin/cservice.example.conf Wed Aug 20 08:33:37 2003 @@ -1,4 +1,4 @@ -# $Id: cservice.example.conf,v 1.1 2003/08/20 14:05:14 darthsidious_ Exp $ +# $Id: cservice.example.conf,v 1.2 2003/08/20 15:33:37 darthsidious_ Exp $ # Channel Services configuration file. # # sql_host = Hostname/IP of the PostgreSQL server. @@ -47,6 +47,21 @@ # Channel used to extract levels to display coder access status. coder_channel = #Coder-com + +# +# Official Channel. +# +# Channel used to extract levels to display a user's "official" status + +official_channel = #Official + +# +# Feds Channel. +# +# Channel used to extract levels to display a users "feds/ feds helper" status +# this _must_ be defined for mod.cservice to run. + +feds_channel = #Feds # # Frequency in seconds to check the database for updates. ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-21 23:14:24
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-21 23:14:23 UTC Modified files: mod.cservice/cservice.cc mod.cservice/cservice.h mod.cservice/Makefile.am mod.cservice/cservice_config.h mod.cservice/levels.h Added files: mod.cservice/ADMINKILLCommand.cc mod.cservice/KILLCommand.cc Log message: new commands added. see README.SithNet and ChangeLog.sithnet for info. ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc diff -u /dev/null gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc:1.1 --- /dev/null Thu Aug 21 16:14:23 2003 +++ gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc Thu Aug 21 16:14:13 2003 @@ -0,0 +1,108 @@ +/* + * ADMINKILLCommand.cc + * + * 23/06/2003 - Tim Ireland <dar...@us...> + * Initial Version. + * Make purely to kill time, if it works cool :) + * If it doesnt it may never. + * Based from the mod.nickserv RECOVERCommand + * + * This is similar to my KILLCommand.cc, except you can #define wether or not + * you want to use it in your cservice_config.h file ( if you choose to + * enable, be aware that all *750+ admins can use it... ) + * $Id: ADMINKILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $ + */ + +#include <string> +#include <sstream> +#include <iostream> +#include <iomanip> + +#include "StringTokenizer.h" +#include "ELog.h" +#include "cservice.h" +#include "responses.h" +#include "networkData.h" +#include "cservice_config.h" +#include "Network.h" + +const char KILLCommand_cc_rcsId[] = "$Id: ADMINKILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $" ; + +namespace gnuworld +{ + +using namespace gnuworld; + +bool KILLCommand::Exec( iClient* theClient, const string& Message ) +{ +bot->incStat("COMMANDS.ADMINKILL"); + +#ifdef USE_ADMINKILL + +StringTokenizer st( Message ) ; +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +/* + * Fetch the sqlUser record attached to this client. If there isn't one, + * they aren't logged in - tell them they should be. + */ + +sqlUser* theUser = bot->isAuthed(theClient, false); +if (!theUser) + { + return false; + } + +int admLevel = bot->getAdminAccessLevel(theUser); +// int oLevel = bot->GetOfficialAccessLevel(theUser); +if (admLevel < level::adminkill) // && (oLevel < level::official::scoder) + +/* keep this command 'quiet' i.e. dont let unauthorised user's + * know anyhting about it + * + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("Sorry, you have insufficient access to +perform that command."))); + */ + return false; + } + +/* + * First, check the user/ nickname exists - is this even the right way to +do this? + */ + + iClient* Target = Network->findNick( st[ 2 ] ) ; +if( NULL == Target ) + { + bot->Notice( theClient, "Unable to find nick: %s", + st[ 2 ].c_str() ) ; + return true ; + } + + if( Target->getMode(iClient::MODE_SERVICES)) + { + bot->Notice(theClient,"No. %s Appears to be a Network Service.",st[ 2 ].c_str()); + return false; + } +bot->Notice( theClient, "Killing %s because %s", + Target->getNickName().c_str(), + st.assemble( 3 ).c_str() ) ; + + bot->logAdminMessage("ADMINKILL %s ",theClient->getNickName.c_str()); + + +bot->Kill( iClient," %s ",reason.c_str()); + + +#endif // USE_KILLCMD + +} + +} // namespace gnuworld. Index: gnuworld-sithnet/mod.cservice/KILLCommand.cc diff -u /dev/null gnuworld-sithnet/mod.cservice/KILLCommand.cc:1.1 --- /dev/null Thu Aug 21 16:14:23 2003 +++ gnuworld-sithnet/mod.cservice/KILLCommand.cc Thu Aug 21 16:14:13 2003 @@ -0,0 +1,99 @@ +/* + * KILLCommand.cc + * + * 23/06/2003 - Tim Ireland <dar...@us...> + * Initial Version. + * Make purely to kill time, if it works cool :) + * If it doesnt it may never. + * Based from the mod.nickserv RECOVERCommand + * + * $Id: KILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $ + */ + +#include <string> +#include "StringTokenizer.h" +#include "ELog.h" +#include "cservice.h" +#include "responses.h" +#include "networkData.h" +#include "cservice_config.h" +#include "Network.h" + +const char KILLCommand_cc_rcsId[] = "$Id: KILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $" ; + +namespace gnuworld +{ + +using namespace gnuworld; +using std::string; + +bool KILLCommand::Exec( iClient* theClient, const string& Message ) +{ +bot->incStat("COMMANDS.KILL"); + +StringTokenizer st( Message ) ; +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +/* + * Fetch the sqlUser record attached to this client. If there isn't one, + * they aren't logged in - tell them they should be. + */ + +sqlUser* theUser = bot->isAuthed(theClient, false); +if (!theUser) + { + return false; + } + +int aLevel = bot->getAdminAccessLevel(theUser); +/* int oLevel = bot->GetOfficialAccessLevel(theUser); */ +if (aLevel < level::kill) + +/* keep this command 'quiet' i.e. dont let unauthorised user's + * know anyhting about it + * + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("Sorry, you have insufficient access to +perform that command."))); + */ + return false; + } + +iClient* Target = Network->findNick( st[ 2 ] ) ; +if( NULL == Target ) + { + bot->Notice( theClient, "Unable to find nick: %s", + st[ 2 ].c_str() ) ; + return true ; + } + + if( Target->getMode(iClient::MODE_SERVICES)) + { + bot->Notice(theClient,"Cannot Kill %s as it appears to be a +Network Service.",st[ 2 ].c_str()); + return false; + } +} + +if(theClient == targetClient) { + bot->Notice(theClient, "Killing yourself is a bad idea."); + return true; +} + +bot->Kill(targetClient, " %s ",reason.c_str()); + +bot->Notice(theClient, "Succesfully Killed " + theClient->getNickName()); + +bot->logAdminMessage("KILL %s",theClient->getNickName.c_str()); + +return true; +} + + +} // namespace gnuworld Index: gnuworld-sithnet/mod.cservice/Makefile.am diff -u gnuworld-sithnet/mod.cservice/Makefile.am:1.2 gnuworld-sithnet/mod.cservice/Makefile.am:1.3 --- gnuworld-sithnet/mod.cservice/Makefile.am:1.2 Thu Aug 21 10:37:57 2003 +++ gnuworld-sithnet/mod.cservice/Makefile.am Thu Aug 21 16:14:13 2003 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.2 2003/08/21 17:37:57 darthsidious_ Exp $" +# "$Id: Makefile.am,v 1.3 2003/08/21 23:14:13 darthsidious_ Exp $" lib_LTLIBRARIES = libcservice.la libcservice_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ \ @@ -67,7 +67,9 @@ UNSUSPENDCommand.cc \ VERIFYCommand.cc \ VOICECommand.cc \ - ADDUSERIDCommand.cc + ADDUSERIDCommand.cc \ + ADMINKILLCommand.cc \ + KILLCommand.cc EXTRA_DIST = constants.h \ cserviceCommands.h \ Index: gnuworld-sithnet/mod.cservice/cservice.cc diff -u gnuworld-sithnet/mod.cservice/cservice.cc:1.3 gnuworld-sithnet/mod.cservice/cservice.cc:1.4 --- gnuworld-sithnet/mod.cservice/cservice.cc:1.3 Thu Aug 21 10:37:57 2003 +++ gnuworld-sithnet/mod.cservice/cservice.cc Thu Aug 21 16:14:13 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.cc,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $ + * $Id: cservice.cc,v 1.4 2003/08/21 23:14:13 darthsidious_ Exp $ */ #include <new> @@ -229,6 +229,8 @@ RegisterCommand(new STATSCommand(this, "STATS", "", 8)); RegisterCommand(new ADDCOMMENTCommand(this, "ADDCOMMENT", "<username> <comment>", 10)); RegisterCommand(new SHUTDOWNCommand(this, "SHUTDOWN", "[reason]", 10)); +RegisterCommand(new KILLCommand(this, "KILL", "<nick> <reason>", 3)); +RegisterCommand(new ADMINKILLCommand(this, "ADMINKILL", "<nick> <reason>", 3)); cserviceConfig = new (std::nothrow) EConfig( args ) ; assert( cserviceConfig != 0 ) ; @@ -699,8 +701,8 @@ const string Command = string_upper( st[ 0 ] ) ; /* - * Just quickly, abort if someone tries to LOGIN or NEWPASS - * unsecurely. + * Just quickly, abort if someone tries to LOGIN, NEWPASS + * or SUSPENDME unsecurely. */ if (!secure && ((Command == "LOGIN") || (Command == "NEWPASS") || (Command == "SUSPENDME")) ) Index: gnuworld-sithnet/mod.cservice/cservice.h diff -u gnuworld-sithnet/mod.cservice/cservice.h:1.2 gnuworld-sithnet/mod.cservice/cservice.h:1.3 --- gnuworld-sithnet/mod.cservice/cservice.h:1.2 Wed Aug 20 08:33:03 2003 +++ gnuworld-sithnet/mod.cservice/cservice.h Thu Aug 21 16:14:13 2003 @@ -17,11 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ + * $Id: cservice.h,v 1.3 2003/08/21 23:14:13 darthsidious_ Exp $ */ #ifndef __CSERVICE_H -#define __CSERVICE_H "$Id: cservice.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" +#define __CSERVICE_H "$Id: cservice.h,v 1.3 2003/08/21 23:14:13 darthsidious_ Exp $" #include <string> #include <vector> @@ -139,6 +139,16 @@ virtual bool Notice( const iClient* Target, const string& ) ; virtual void OnWhois( iClient* sourceClient, iClient* targetClient ); + /** + * Kill will issue a KILL command to the network for + * the given iClient (network generic client). + */ + virtual bool Kill( iClient*, const string& ) ; + + /** + * OnKill() is called when the client has been KILL'd. + */ + virtual void OnKill() ; /* Sends a notice to a channel from the server. */ bool serverNotice( Channel*, const char*, ... ); Index: gnuworld-sithnet/mod.cservice/cservice_config.h diff -u gnuworld-sithnet/mod.cservice/cservice_config.h:1.2 gnuworld-sithnet/mod.cservice/cservice_config.h:1.3 --- gnuworld-sithnet/mod.cservice/cservice_config.h:1.2 Wed Aug 20 08:33:03 2003 +++ gnuworld-sithnet/mod.cservice/cservice_config.h Thu Aug 21 16:14:13 2003 @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice_config.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ + * $Id: cservice_config.h,v 1.3 2003/08/21 23:14:13 darthsidious_ Exp $ */ #ifndef __CSERVICE_CONFIG_H -#define __CSERVICE_CONFIG_H "$Id: cservice_config.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" +#define __CSERVICE_CONFIG_H "$Id: cservice_config.h,v 1.3 2003/08/21 23:14:13 darthsidious_ Exp $" /** * Define this if you wish for all SQL queries to be sent @@ -79,5 +79,15 @@ */ #define USE_SETMAXLOGINS + +/** + * Do you want Senior Channel Service Administrators to be able to /kill + * user's throught the use of the ADMINKILL Command? #undef if you dont + * WARNING: this command can be a security risk. DO NOT ENABLE UNLESS + * YOU COMPLETELY TRUST ALL CSERVICE ADMINS WITH A GLOBAL ACCESS LEVEL + * OF 750 OR HIGHER. + */ + +#define USE_ADMINKILL #endif // __CSERVICE_CONFIG_H Index: gnuworld-sithnet/mod.cservice/levels.h diff -u gnuworld-sithnet/mod.cservice/levels.h:1.3 gnuworld-sithnet/mod.cservice/levels.h:1.4 --- gnuworld-sithnet/mod.cservice/levels.h:1.3 Thu Aug 21 10:37:57 2003 +++ gnuworld-sithnet/mod.cservice/levels.h Thu Aug 21 16:14:13 2003 @@ -21,11 +21,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: levels.h,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $ + * $Id: levels.h,v 1.4 2003/08/21 23:14:13 darthsidious_ Exp $ */ #ifndef __LEVELS_H -#define __LEVELS_H "$Id: levels.h,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $" +#define __LEVELS_H "$Id: levels.h,v 1.4 2003/08/21 23:14:13 darthsidious_ Exp $" namespace gnuworld { @@ -90,6 +90,13 @@ // Debug Commands const int shutdown = 900; const int quote = 1000; + + // adminkill is a potential security risk if admins are untrustworthy + const int adminkill = 750; + // this one is not #defineable, make sure u trust urself if u have + // *1000 ;) + const int kill = 1000; + namespace set { const int alwaysop = 450; ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-21 23:15:54
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-21 23:15:48 UTC Modified files: ChangeLog.sithnet Added files: README.SithNet Log message: new commands added. see README.SithNet and ChangeLog.sithnet for info. ---------------------- diff included ---------------------- Index: gnuworld-sithnet/ChangeLog.sithnet diff -u gnuworld-sithnet/ChangeLog.sithnet:1.3 gnuworld-sithnet/ChangeLog.sithnet:1.4 --- gnuworld-sithnet/ChangeLog.sithnet:1.3 Thu Aug 21 10:43:04 2003 +++ gnuworld-sithnet/ChangeLog.sithnet Thu Aug 21 16:15:38 2003 @@ -1,3 +1,11 @@ +2003-08-22 Tim Ireland <dar...@us...> + * mod.cservice/ADMINKILLCommand.cc mod.cservice/levels.h + mod.cservice/KILLCommand.cc mod.cservice/cservice.h + mod.cservice/cservice.cc mod.cservice/cservice_config.h + mod.cservice/cserviceCommands.h mod.cservice/Makefile.am: + Finished off a couple of commands ive been coding occaisionally + Makefile MUST be regenned if you use the cservice module + 2003-08-21 Tim Ireland <dar...@us...> * mod.cservice/ADDUSERIDCommand.cc mod.cservice/cservice.cc mod.cservice/cserviceCommands.h mod.cservice/levels.h Index: gnuworld-sithnet/README.SithNet diff -u /dev/null gnuworld-sithnet/README.SithNet:1.1 --- /dev/null Thu Aug 21 16:15:48 2003 +++ gnuworld-sithnet/README.SithNet Thu Aug 21 16:15:38 2003 @@ -0,0 +1,18 @@ +BEFORE YOU ATTEMPT TO COMPILE THIS YOU MUST RUN ACLOCAL / AUTOCONF / +AUTOMAKE DUE TO SEVERAL COMMANDS BEING ADDED. IF YOU DONT DO THIS IT +WILL NOT WORK. + +new commands added are all in mod.cservice: ADDUSERID ADMINKILL and +KILL. +ADDUSERID allows *900 admins to directly add a user to the database. +ADMINKILL, if #defined, allows and *750 or higher admin to /kill a user +via /msg S ADMINKILL nick reason. +THIS IS A SECURITY RISK. unless you COMPLETELY trust your senior +administrators change the #define USE_ADMINKILL in cservice_config.h to +#undef USE_ADMINKILL +KILL: this is essentially the same, except only *1000 admins can make +use of it. +MAKEFILES IN MOD.CSERVICE MUST BE REGENNED IT YOU INTEND TO USE THE +CSERVICE MODULE (aclocal, autoconf and automake) + +-Darth ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-22 02:48:47
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-21 17:43:14 UTC Modified files: ChangeLog.sithnet Log message: Implemented OUTsider's ADDUSERIDCommand dont forget to run autoconf etc on these... ---------------------- diff included ---------------------- Index: gnuworld-sithnet/ChangeLog.sithnet diff -u gnuworld-sithnet/ChangeLog.sithnet:1.2 gnuworld-sithnet/ChangeLog.sithnet:1.3 --- gnuworld-sithnet/ChangeLog.sithnet:1.2 Wed Aug 20 08:40:35 2003 +++ gnuworld-sithnet/ChangeLog.sithnet Thu Aug 21 10:43:04 2003 @@ -1,3 +1,11 @@ +2003-08-21 Tim Ireland <dar...@us...> + * mod.cservice/ADDUSERIDCommand.cc mod.cservice/cservice.cc + mod.cservice/cserviceCommands.h mod.cservice/levels.h + mod.cservice/Makefile.am: + Implemented OUTsider's ADDUSERIDCommand patch, if u use this u + will need to manually update ur makefiles via + aclocal/autoconf/automake. + 2003-08-20 Tim Ireland <dar...@us...> * mod.cservice/cservice.cc mod.cservice/cservice.h mod.cservice/cservice_Config.h mod.cservice/responses.h ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-22 10:25:49
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-21 17:38:07 UTC Modified files: mod.cservice/Makefile.am mod.cservice/cservice.cc mod.cservice/cserviceCommands.h mod.cservice/levels.h Added files: mod.cservice/ADDUSERIDCommand.cc Log message: Implemented OUTsider's ADDUSERIDCommand dont forget to run autoconf etc on these.. ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/ADDUSERIDCommand.cc diff -u /dev/null gnuworld-sithnet/mod.cservice/ADDUSERIDCommand.cc:1.1 --- /dev/null Thu Aug 21 10:38:07 2003 +++ gnuworld-sithnet/mod.cservice/ADDUSERIDCommand.cc Thu Aug 21 10:37:57 2003 @@ -0,0 +1,175 @@ +/* ADDUSERIDCommand.cc + * Adds a user to the database, usefull should pages not be available or obsolete + */ + +#include <string> +#include <iomanip.h> + +#include "md5hash.h" +#include "StringTokenizer.h" +#include "ELog.h" +#include "cservice.h" +#include "responses.h" +#include "networkData.h" +#include "levels.h" +#include "libpq++.h" +#include "responses.h" +#include "Network.h" + + +const char ADDUSERIDCommand_cc_rcsId[] = "$Id: ADDUSERIDCommand.cc,v 1.1 2003/08/21 17:37:57 darthsidious_ Exp $" ; + +namespace gnuworld +{ + +using namespace gnuworld; + +bool ADDUSERIDCommand::Exec( iClient* theClient, const string& Message ) +{ + + const char validChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.$*_"; + + StringTokenizer st( Message ) ; + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + + /* + * Fetch the sqlUser record attached to this client. If there isn't one, + * they aren't logged in - tell them they should be. + */ + + sqlUser* theUser = bot->isAuthed(theClient, true); + if (!theUser) return false; + + + /* + * Check Command access + */ + int level = bot->getAdminAccessLevel(theUser); + if (level < level::adduserid) + { + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("You have insufficient access to perform that command."))); + return false; + } + + /* + * User exists?! Bail out, we don't want clones! + */ + sqlUser* Target = bot->getUserRecord(st[1]); + if(Target) + { + bot->Notice(theClient, "Sorry, %s is already present in the database" ,st[1].c_str()); + return false; + } + + /* Try and stop people using an invalid syntax.. */ + if (string_lower(st[1]) == string_lower(st[2]) ) + { + bot->Notice(theClient, "The passphrase cannot be the same as the username"); + return false; + } + + /* Work out some salt. */ + string salt; + + // TODO: Why calling srand() here? + srand(clock() * 1000000); + + // TODO: What is the significance of '8' here? + // Schema states a fixed 8 bytes of random salt are used in generating the + // password. + for ( unsigned short int i = 0 ; i < 8; i++) + { + int randNo = 1+(int) (64.0*rand()/(RAND_MAX+1.0)); + salt += validChars[randNo]; + } + + /* Work out a MD5 hash of our salt + password */ + + md5 hash; // MD5 hash algorithm object. + md5Digest digest; // MD5Digest algorithm object. + + // Prepend the salt to the password + string newPass = salt + st[2]; + + // Take the md5 hash of this newPass string + hash.update( (const unsigned char *)newPass.c_str(), newPass.size() ); + hash.report( digest ); + + /* Convert to Hex */ + + int data[ MD5_DIGEST_LENGTH ] = { 0 } ; + for( size_t i = 0 ; i < MD5_DIGEST_LENGTH ; ++i ) + { + data[ i ] = digest[ i ] ; + } + + strstream output; + output << hex; + output.fill('0'); + for( size_t ii = 0; ii < MD5_DIGEST_LENGTH; ii++ ) + { + output << setw(2) << data[ii]; + } + output << ends; + + // Prepend the md5 hash to the salt + string finalPassword = salt + output.str(); + + /* + * Check if the email is a correct one + */ + StringTokenizer st2( st[ 3 ], '@' ) ; + + if( (st2.size() != 2) || (st2[ 1 ].size() > 128 ) ) + { + bot->Notice(theClient, "Sorry, this email address is not valid."); + return false ; + } + + /* + * Finally done, let's rock and roll.... + */ + + strstream theQuery ; + theQuery << "INSERT INTO users (user_name, password, email, language_id, last_updated_by, last_updated ) " + << "VALUES (" + << "'" << st[1] << "'," + << "'" << finalPassword.c_str() << "'," + << "'" << st[3] << "',1," + << "'(" << theUser->getUserName() << ") " + << theClient->getNickUserHost() << "'," + << bot->currentTime() + << ");" + << ends; + +#ifdef LOG_SQL + elog << "ADDUSERID::sqlQuery> " + << theQuery.str() + << endl; +#endif + + ExecStatusType status = bot->SQLDb->Exec(theQuery.str()) ; + delete[] theQuery.str() ; + + if( PGRES_COMMAND_OK != status ) + { + bot->dbErrorMessage(theClient); + return false ; + } + + bot->Notice(theClient, "%s has been added to the database with email address %s and password %s" ,st[1].c_str(), st[3].c_str(), st[2].c_str()); + + delete[] output.str() ; + return true; + } + + +} // namespace gnuworld Index: gnuworld-sithnet/mod.cservice/Makefile.am diff -u gnuworld-sithnet/mod.cservice/Makefile.am:1.1.1.1 gnuworld-sithnet/mod.cservice/Makefile.am:1.2 --- gnuworld-sithnet/mod.cservice/Makefile.am:1.1.1.1 Mon Aug 18 13:30:45 2003 +++ gnuworld-sithnet/mod.cservice/Makefile.am Thu Aug 21 10:37:57 2003 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.1.1.1 2003/08/18 20:30:45 darthsidious_ Exp $" +# "$Id: Makefile.am,v 1.2 2003/08/21 17:37:57 darthsidious_ Exp $" lib_LTLIBRARIES = libcservice.la libcservice_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ \ @@ -66,7 +66,8 @@ UNFORCECommand.cc \ UNSUSPENDCommand.cc \ VERIFYCommand.cc \ - VOICECommand.cc + VOICECommand.cc \ + ADDUSERIDCommand.cc EXTRA_DIST = constants.h \ cserviceCommands.h \ Index: gnuworld-sithnet/mod.cservice/cservice.cc diff -u gnuworld-sithnet/mod.cservice/cservice.cc:1.2 gnuworld-sithnet/mod.cservice/cservice.cc:1.3 --- gnuworld-sithnet/mod.cservice/cservice.cc:1.2 Wed Aug 20 08:33:03 2003 +++ gnuworld-sithnet/mod.cservice/cservice.cc Thu Aug 21 10:37:57 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.cc,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ + * $Id: cservice.cc,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $ */ #include <new> @@ -223,6 +223,7 @@ RegisterCommand(new UNFORCECommand(this, "UNFORCE", "<#channel>", 8)); RegisterCommand(new SERVNOTICECommand(this, "SERVNOTICE", "<#channel> <text>", 5)); RegisterCommand(new SAYCommand(this, "SAY", "<#channel> <text>", 5)); +RegisterCommand(new ADDUSERIDCommand(this, "ADDUSERID", "<userid> <password> <email>", 5)); RegisterCommand(new QUOTECommand(this, "QUOTE", "<text>", 5)); RegisterCommand(new REHASHCommand(this, "REHASH", "[translations | help]]", 5)); RegisterCommand(new STATSCommand(this, "STATS", "", 8)); Index: gnuworld-sithnet/mod.cservice/cserviceCommands.h diff -u gnuworld-sithnet/mod.cservice/cserviceCommands.h:1.1.1.1 gnuworld-sithnet/mod.cservice/cserviceCommands.h:1.2 --- gnuworld-sithnet/mod.cservice/cserviceCommands.h:1.1.1.1 Mon Aug 18 13:30:44 2003 +++ gnuworld-sithnet/mod.cservice/cserviceCommands.h Thu Aug 21 10:37:57 2003 @@ -16,11 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cserviceCommands.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $ + * $Id: cserviceCommands.h,v 1.2 2003/08/21 17:37:57 darthsidious_ Exp $ */ #ifndef __CSERVICECOMMANDS_H -#define __CSERVICECOMMANDS_H "$Id: cserviceCommands.h,v 1.1.1.1 2003/08/18 20:30:44 darthsidious_ Exp $" +#define __CSERVICECOMMANDS_H "$Id: cserviceCommands.h,v 1.2 2003/08/21 17:37:57 darthsidious_ Exp $" #include <string> @@ -148,6 +148,7 @@ DECLARE_COMMAND( SERVNOTICE ) DECLARE_COMMAND( SAY ) DECLARE_COMMAND( QUOTE ) +DECLARE_COMMAND( ADDUSERID ) DECLARE_COMMAND( REHASH ) DECLARE_COMMAND( STATS ) DECLARE_COMMAND( ADDCOMMENT ) Index: gnuworld-sithnet/mod.cservice/levels.h diff -u gnuworld-sithnet/mod.cservice/levels.h:1.2 gnuworld-sithnet/mod.cservice/levels.h:1.3 --- gnuworld-sithnet/mod.cservice/levels.h:1.2 Wed Aug 20 08:33:03 2003 +++ gnuworld-sithnet/mod.cservice/levels.h Thu Aug 21 10:37:57 2003 @@ -21,11 +21,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: levels.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $ + * $Id: levels.h,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $ */ #ifndef __LEVELS_H -#define __LEVELS_H "$Id: levels.h,v 1.2 2003/08/20 15:33:03 darthsidious_ Exp $" +#define __LEVELS_H "$Id: levels.h,v 1.3 2003/08/21 17:37:57 darthsidious_ Exp $" namespace gnuworld { @@ -85,6 +85,7 @@ const int servnotice = 800; const int say = 800; + const int adduserid = 900; // Debug Commands const int shutdown = 900; ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-23 00:16:44
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-23 00:16:44 UTC Added files: mod.antispamserv/README Log message: started work on an antispam module similar to quakenet/ezirc's S bot ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.antispamserv/README diff -u /dev/null gnuworld-sithnet/mod.antispamserv/README:1.1 --- /dev/null Fri Aug 22 17:16:44 2003 +++ gnuworld-sithnet/mod.antispamserv/README Fri Aug 22 17:16:34 2003 @@ -0,0 +1,2 @@ +Started work on an 'Anti-Spam Serv' module. this will be similar to the +'S' bot in use on QuakeNet and ExclusionZoneIRC ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-23 01:10:49
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-23 01:10:48 UTC Modified files: Makefile.am Log message: added new moddir's to makefile ---------------------- diff included ---------------------- Index: gnuworld-sithnet/Makefile.am diff -u gnuworld-sithnet/Makefile.am:1.1.1.1 gnuworld-sithnet/Makefile.am:1.2 --- gnuworld-sithnet/Makefile.am:1.1.1.1 Mon Aug 18 13:28:16 2003 +++ gnuworld-sithnet/Makefile.am Fri Aug 22 18:10:38 2003 @@ -1,8 +1,12 @@ -## $Id: Makefile.am,v 1.1.1.1 2003/08/18 20:28:16 darthsidious_ Exp $ +## $Id: Makefile.am,v 1.2 2003/08/23 01:10:38 darthsidious_ Exp $ ## test @SET_MAKE@ +if COND_MODANTISPAMSERV + MODANTISPAMSERV = mod.antispamserv +endif + if COND_MODCCONTROL MODCCONTROL = mod.ccontrol endif @@ -27,6 +31,9 @@ MODGNUTEST = mod.gnutest endif +if COND_MODLIGHTWEIGHT + MODLIGHTWEIGHT = mod.lightweight + if COND_MODNICKSERV MODNICKSERV = mod.nickserv endif @@ -39,6 +46,9 @@ MODSTATS = mod.stats endif +if COND_MODUWORLD + MODUWORLD = mod.uworld + if COND_TESTDIR TESTDIR = test endif @@ -54,9 +64,11 @@ $(MODCSERVICE) \ $(MODDRONESCAN) \ $(MODGNUTEST) \ + $(MODLIGHTWEIGHT) \ $(MODNICKSERV) \ $(MODSCANNER) \ $(MODSTATS) \ + $(MODUWORLD) \ $(TESTDIR) \ $(DBDIR) \ libircu @@ -68,9 +80,11 @@ bin/dronescan.example.conf.in \ bin/gnutest.example.conf.in \ bin/GNUWorld.example.conf.in \ + bin/lightweight.example.conf.in \ bin/nickserv.example.conf.in \ bin/scanner.example.conf.in \ bin/stats.example.conf.in \ + bin/uworld.example.conf.in \ bin/server_command_map \ contrib/00INDEX.TXT \ contrib/chktrans.py \ ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-23 01:21:36
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-23 01:21:35 UTC Modified files: Makefile.in Log message: added new moddir's to makefile ---------------------- diff included ---------------------- Index: gnuworld-sithnet/Makefile.in diff -u gnuworld-sithnet/Makefile.in:1.1.1.1 gnuworld-sithnet/Makefile.in:1.2 --- gnuworld-sithnet/Makefile.in:1.1.1.1 Mon Aug 18 13:28:16 2003 +++ gnuworld-sithnet/Makefile.in Fri Aug 22 18:21:25 2003 @@ -50,6 +50,8 @@ CFLAGS = @CFLAGS@ COND_DBDIR_FALSE = @COND_DBDIR_FALSE@ COND_DBDIR_TRUE = @COND_DBDIR_TRUE@ +COND_MODANTISPAMSERV_FALSE = @COND_MODANTISPAMSERV_FALSE@ +COND_MODANTISPAMSERV_TRUE = @COND_MODANTISPAMSERV_TRUE@ COND_MODCCONTROL_FALSE = @COND_MODCCONTROL_FALSE@ COND_MODCCONTROL_TRUE = @COND_MODCCONTROL_TRUE@ COND_MODCLIENTEXAMPLE_FALSE = @COND_MODCLIENTEXAMPLE_FALSE@ @@ -62,12 +64,16 @@ COND_MODDRONESCAN_TRUE = @COND_MODDRONESCAN_TRUE@ COND_MODGNUTEST_FALSE = @COND_MODGNUTEST_FALSE@ COND_MODGNUTEST_TRUE = @COND_MODGNUTEST_TRUE@ +COND_MODLIGHTWEIGHT_FALSE = @COND_MODLIGHTWEIGHT_FALSE@ +COND_MODLIGHTWEIGHT_TRUE = @COND_MODLIGHTWEIGHT_TRUE@ COND_MODNICKSERV_FALSE = @COND_MODNICKSERV_FALSE@ COND_MODNICKSERV_TRUE = @COND_MODNICKSERV_TRUE@ COND_MODSCANNER_FALSE = @COND_MODSCANNER_FALSE@ COND_MODSCANNER_TRUE = @COND_MODSCANNER_TRUE@ COND_MODSTATS_FALSE = @COND_MODSTATS_FALSE@ COND_MODSTATS_TRUE = @COND_MODSTATS_TRUE@ +COND_MODUWORLD_FALSE = @COND_MODUWORLD_FALSE@ +COND_MODUWORLD_TRUE = @COND_MODUWORLD_TRUE@ COND_TESTDIR_FALSE = @COND_TESTDIR_FALSE@ COND_TESTDIR_TRUE = @COND_TESTDIR_TRUE@ CPP = @CPP@ @@ -165,6 +171,8 @@ target_alias = @target_alias@ threadLib = @threadLib@ +@COND_MODANTISPAMSERV_TRUE@MODANTISPAMSERV = mod.antispamserv + @COND_MODCCONTROL_TRUE@MODCCONTROL = mod.ccontrol @COND_MODCLIENTEXAMPLE_TRUE@MODCLIENTEXAMPLE = mod.clientExample @@ -177,41 +185,51 @@ @COND_MODGNUTEST_TRUE@MODGNUTEST = mod.gnutest +@COND_MODLIGHTWEIGHT_TRUE@MODLIGHTWEIGHT = mod.lightweight + @COND_MODNICKSERV_TRUE@MODNICKSERV = mod.nickserv @COND_MODSCANNER_TRUE@MODSCANNER = mod.scanner @COND_MODSTATS_TRUE@MODSTATS = mod.stats +@COND_MODUWORLD_TRUE@MODUWORLD = mod.uworld + @COND_TESTDIR_TRUE@TESTDIR = test @COND_DBDIR_TRUE@DBDIR = db SUBDIRS = libgnuworld libltdl src @NEW_MODS@ \ + $(MODANTISPAMSERV) \ $(MODCCONTROL) \ $(MODCLIENTEXAMPLE) \ $(MODCLONER) \ $(MODCSERVICE) \ $(MODDRONESCAN) \ $(MODGNUTEST) \ + $(MODLIGHTWEIGHT) \ $(MODNICKSERV) \ $(MODSCANNER) \ $(MODSTATS) \ + $(MODUWORLD) \ $(TESTDIR) \ $(DBDIR) \ libircu -EXTRA_DIST = bin/ccontrol.example.conf.in \ +EXTRA_DIST = bin/antispamserv.example.conf.in \ + bin/ccontrol.example.conf.in \ bin/clientExample.example.conf.in \ bin/cloner.example.conf.in \ bin/cservice.example.conf.in \ bin/dronescan.example.conf.in \ bin/gnutest.example.conf.in \ bin/GNUWorld.example.conf.in \ + bin/lightweight.example.conf.in \ bin/nickserv.example.conf.in \ bin/scanner.example.conf.in \ bin/stats.example.conf.in \ + bin/uworld.example.conf.in \ bin/server_command_map \ contrib/00INDEX.TXT \ contrib/chktrans.py \ @@ -313,7 +331,8 @@ bin/cservice.example.conf bin/gnutest.example.conf \ bin/GNUWorld.example.conf bin/nickserv.example.conf \ bin/scanner.example.conf bin/stats.example.conf \ - bin/dronescan.example.conf + bin/dronescan.example.conf bin/antispamserv.example.conf.in \ + bin/lightweight.example.conf.in bi/uworld.example.conf.in DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-23 01:46:57
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-23 01:46:56 UTC Removed files: mod.antispamserv/README Log message: Removed module ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.antispamserv/README diff -u gnuworld-sithnet/mod.antispamserv/README:1.1 gnuworld-sithnet/mod.antispamserv/README:removed --- gnuworld-sithnet/mod.antispamserv/README:1.1 Fri Aug 22 17:16:34 2003 +++ gnuworld-sithnet/mod.antispamserv/README Fri Aug 22 18:46:56 2003 @@ -1,2 +0,0 @@ -Started work on an 'Anti-Spam Serv' module. this will be similar to the -'S' bot in use on QuakeNet and ExclusionZoneIRC ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-30 22:24:31
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-30 22:24:29 UTC Modified files: mod.cservice/ADMINKILLCommand.cc mod.cservice/KILLCommand.cc Log message: bug fixes, these currently do not work. ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc diff -u gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc:1.1 gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc:1.2 --- gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc:1.1 Thu Aug 21 16:14:13 2003 +++ gnuworld-sithnet/mod.cservice/ADMINKILLCommand.cc Sat Aug 30 15:24:19 2003 @@ -4,13 +4,13 @@ * 23/06/2003 - Tim Ireland <dar...@us...> * Initial Version. * Make purely to kill time, if it works cool :) - * If it doesnt it may never. + * If it doesnt it may never - if you want to do a bugfix and send it to me, feel free :). * Based from the mod.nickserv RECOVERCommand * * This is similar to my KILLCommand.cc, except you can #define wether or not * you want to use it in your cservice_config.h file ( if you choose to * enable, be aware that all *750+ admins can use it... ) - * $Id: ADMINKILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $ + * $Id: ADMINKILLCommand.cc,v 1.2 2003/08/30 22:24:19 darthsidious_ Exp $ */ #include <string> @@ -18,59 +18,56 @@ #include <iostream> #include <iomanip> +#include "Network.h" +#include "iClient.h" //is this needed? put in because compiler came back with iClient not defined, now 'not declared in this scope' +#include "NetworkTarget.h" // needed? y/n? #include "StringTokenizer.h" #include "ELog.h" #include "cservice.h" #include "responses.h" #include "networkData.h" #include "cservice_config.h" -#include "Network.h" -const char KILLCommand_cc_rcsId[] = "$Id: ADMINKILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $" ; +// are any other #nclude's needed? - i really need to relearn all this :S + +const char ADMINKILLCommand_cc_rcsId[] = "$Id: ADMINKILLCommand.cc,v 1.2 2003/08/30 22:24:19 darthsidious_ Exp $" ; namespace gnuworld { using namespace gnuworld; -bool KILLCommand::Exec( iClient* theClient, const string& Message ) +bool ADMINKILLCommand::Exec( iClient* theClient, const string& Message ) { -bot->incStat("COMMANDS.ADMINKILL"); + bot->incStat("COMMANDS.ADMINKILL"); -#ifdef USE_ADMINKILL + #ifdef USE_ADMINKILL -StringTokenizer st( Message ) ; -if( st.size() < 3 ) + StringTokenizer st( Message ) ; + if( st.size() < 3 ) { - Usage(theClient); - return true; + Usage(theClient); + return true; } -/* - * Fetch the sqlUser record attached to this client. If there isn't one, - * they aren't logged in - tell them they should be. - */ + /* + * Fetch the sqlUser record attached to this client. If there isn't one, + * they aren't logged in - tell them they should be. + */ -sqlUser* theUser = bot->isAuthed(theClient, false); -if (!theUser) - { - return false; - } + sqlUser* theUser = bot->isAuthed(theClient, true); + if (!theUser) return false; -int admLevel = bot->getAdminAccessLevel(theUser); -// int oLevel = bot->GetOfficialAccessLevel(theUser); -if (admLevel < level::adminkill) // && (oLevel < level::official::scoder) - -/* keep this command 'quiet' i.e. dont let unauthorised user's - * know anyhting about it - * - bot->Notice(theClient, - bot->getResponse(theUser, - language::insuf_access, - string("Sorry, you have insufficient access to -perform that command."))); - */ - return false; + sqlChannel* admChan = bot->getChannelRecord("*"); + + int admLevel = bot->getAccessLevel(theUser, admChan); + if (admLevel < level::adminkill) + { + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("Sorry, you have insufficient access to perform that command."))); + return false; } /* @@ -79,7 +76,7 @@ */ iClient* Target = Network->findNick( st[ 2 ] ) ; -if( NULL == Target ) +if( iClient == NULL ) { bot->Notice( theClient, "Unable to find nick: %s", st[ 2 ].c_str() ) ; Index: gnuworld-sithnet/mod.cservice/KILLCommand.cc diff -u gnuworld-sithnet/mod.cservice/KILLCommand.cc:1.1 gnuworld-sithnet/mod.cservice/KILLCommand.cc:1.2 --- gnuworld-sithnet/mod.cservice/KILLCommand.cc:1.1 Thu Aug 21 16:14:13 2003 +++ gnuworld-sithnet/mod.cservice/KILLCommand.cc Sat Aug 30 15:24:19 2003 @@ -7,7 +7,7 @@ * If it doesnt it may never. * Based from the mod.nickserv RECOVERCommand * - * $Id: KILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $ + * $Id: KILLCommand.cc,v 1.2 2003/08/30 22:24:19 darthsidious_ Exp $ */ #include <string> @@ -17,9 +17,9 @@ #include "responses.h" #include "networkData.h" #include "cservice_config.h" -#include "Network.h" +#include "levels.h" -const char KILLCommand_cc_rcsId[] = "$Id: KILLCommand.cc,v 1.1 2003/08/21 23:14:13 darthsidious_ Exp $" ; +const char KILLCommand_cc_rcsId[] = "$Id: KILLCommand.cc,v 1.2 2003/08/30 22:24:19 darthsidious_ Exp $" ; namespace gnuworld { @@ -29,54 +29,46 @@ bool KILLCommand::Exec( iClient* theClient, const string& Message ) { -bot->incStat("COMMANDS.KILL"); + bot->incStat("COMMANDS.KILL"); -StringTokenizer st( Message ) ; -if( st.size() < 3 ) + StringTokenizer st( Message ) ; + if( st.size() < 3 ) { - Usage(theClient); - return true; + Usage(theClient); + return true; } -/* - * Fetch the sqlUser record attached to this client. If there isn't one, - * they aren't logged in - tell them they should be. - */ + /* + * Fetch the sqlUser record attached to this client. If there isn't one, + * they aren't logged in - tell them they should be. + */ -sqlUser* theUser = bot->isAuthed(theClient, false); -if (!theUser) - { - return false; - } + sqlUser* theUser = bot->isAuthed(theClient, true); + if (!theUser) return false; -int aLevel = bot->getAdminAccessLevel(theUser); -/* int oLevel = bot->GetOfficialAccessLevel(theUser); */ -if (aLevel < level::kill) - -/* keep this command 'quiet' i.e. dont let unauthorised user's - * know anyhting about it - * - bot->Notice(theClient, - bot->getResponse(theUser, - language::insuf_access, - string("Sorry, you have insufficient access to -perform that command."))); - */ - return false; + sqlChannel* admChan = bot->getChannelRecord("*"); + + int admLevel = bot->getAccessLevel(theUser, admChan); + if (admLevel < level::adminkill) + { + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("Sorry, you have insufficient access to perform that command."))); + return false; } -iClient* Target = Network->findNick( st[ 2 ] ) ; -if( NULL == Target ) +iClient* theClient = Network->findNick( st[ 2 ] ) ; +if( iClient == NULL ) { bot->Notice( theClient, "Unable to find nick: %s", st[ 2 ].c_str() ) ; return true ; } - if( Target->getMode(iClient::MODE_SERVICES)) + if( theClient->getMode(iClient::MODE_SERVICES)) { - bot->Notice(theClient,"Cannot Kill %s as it appears to be a -Network Service.",st[ 2 ].c_str()); + bot->Notice(theClient,"Cannot Kill %s as it appears to be a Network Service.",st[ 3 ].c_str()); return false; } } @@ -88,7 +80,7 @@ bot->Kill(targetClient, " %s ",reason.c_str()); -bot->Notice(theClient, "Succesfully Killed " + theClient->getNickName()); +bot->Notice(theClient, "Succesfully Killed " + iClient->getNickName()); bot->logAdminMessage("KILL %s",theClient->getNickName.c_str()); ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-08-31 18:35:35
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-08-31 18:35:21 UTC Added files: mod.uworld/ACCESSCommand.cc mod.uworld/ADDUSERCommand.cc mod.uworld/AGLCommand.cc mod.uworld/BADCHANCommand.cc mod.uworld/CHANINFOCommand.cc mod.uworld/CHECKNETCommand.cc mod.uworld/CLEARCHANCommand.cc mod.uworld/COPYING mod.uworld/ChangeLog mod.uworld/DEAUTHCommand.cc mod.uworld/DELSERVERCommand.cc mod.uworld/FDEAUTHCommand.cc mod.uworld/GLINECommand.cc mod.uworld/GLOBALNOTCommand.cc mod.uworld/HELPCommand.cc mod.uworld/INVITECommand.cc mod.uworld/INVMECommand.cc mod.uworld/JOINCommand.cc mod.uworld/JUPECommand.cc mod.uworld/LASTCOMMCommand.cc mod.uworld/LEARNNETCommand.cc mod.uworld/LICENSE mod.uworld/LISTCommand.cc mod.uworld/LOGINCommand.cc mod.uworld/MODECommand.cc mod.uworld/MODUSERCommand.cc mod.uworld/Makefile.am mod.uworld/Makefile.in mod.uworld/NEWPASSCommand.cc mod.uworld/OMSGCommand.cc mod.uworld/OPCHANCommand.cc mod.uworld/PARTCommand.cc mod.uworld/QUOTECommand.cc mod.uworld/REMBADCHANCommand.cc mod.uworld/REMGLINECommand.cc mod.uworld/REMUSERCommand.cc mod.uworld/SAYCommand.cc mod.uworld/SERVLISTCommand.cc mod.uworld/SHUTDOWNCommand.cc mod.uworld/STATUSCommand.cc mod.uworld/SUSPENDCommand.cc mod.uworld/TRANSLATECommand.cc mod.uworld/UNSUSPENDCommand.cc mod.uworld/UPTIMECommand.cc mod.uworld/WALLOPSCommand.cc mod.uworld/WHOISCommand.cc mod.uworld/constants.h mod.uworld/glineConstants.h mod.uworld/levels.h mod.uworld/uwAGL.cc mod.uworld/uwAGL.h mod.uworld/uwGline.cc mod.uworld/uwGline.h mod.uworld/uwLog.cc mod.uworld/uwLog.h mod.uworld/uwServer.cc mod.uworld/uwServer.h mod.uworld/uwUser.cc mod.uworld/uwUser.h mod.uworld/uworld.cc mod.uworld/uworld.h mod.uworld/uworldCommands.cc mod.uworld/uworldCommands.h Log message: Initial Import of mod.uworld with GNUWorld ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.uworld/ACCESSCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/ACCESSCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/ACCESSCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,67 @@ +/* + * ACCESSCommand.cc + * + * Shows all the users that has access to the bot + */ + +#include <string> +#include <sstream> +#include <cstdlib> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "constants.h" + +const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool ACCESSCommand::Exec( iClient* theClient, const string& Message) +{ + +StringTokenizer st( Message ) ; + + +bool PrivMsg = bot->SendPrivmsg(theClient); + +string Uname; +if(st.size() > 1) + { + if(st[1].size() > 64) + { + bot->SendTo(theClient, PrivMsg,"User name can't be more than 64 chars"); + return false; + } + Uname = string_lower(st[1]); + } +else + { + Uname = ""; + } + +bot->listUsers(theClient, PrivMsg, Uname); + + +string username = "notLoggedIn"; +uwUser* theUser = bot->IsAuth(theClient); +if(theUser) username = theUser->getUserName(); +bot->addLog(username, theClient, "ACCESS %s", st.assemble(1).c_str()); + +// no msgchanlog here! + +return true; +} + +} + +} // namespace gnuworld Index: gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,106 @@ +/* + * ADDUSERCommand.cc + * + * Author: Matthias Crauwels <ult...@wo...> + * Date: 29-06-2002 + * + */ + +#include <string> +#include <iomanip> +#include <sstream> + +#include <cstdlib> + +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" +#include "uworld.h" + +const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool ADDUSERCommand::Exec( iClient* theClient, const string& Message ) +{ + +// adduser <nick> <level> <pass> +StringTokenizer st( Message ) ; + +bool PrivMsg = bot->SendPrivmsg(theClient); + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::adduser) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::adduser); + return false; + } + +if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + +if(st[1].size() > 64) + { + bot->SendTo(theClient, PrivMsg, "User name can't be more than 64 chars"); + return false; + } + +uwUser* tmpUser = bot->GetUser(bot->removeSqlChars(st[1])); +if( tmpUser ) + { + bot->SendTo(theClient, PrivMsg, "This user allready exists!!"); + return false; + } + +int level = atoi(st[2].c_str()); +if( level >= bot->getOperLevel(theClient)) + { + bot->SendTo(theClient, PrivMsg, "You can NOT add users with access higher or equal to your own!"); + return false; + } + +if( (level < 0) || (level > 1000) ) + { + bot->SendTo(theClient, PrivMsg, "An access level has to been between 0 and 1000"); + return false; + } + +string pass = bot->CryptPass(st[3]).c_str(); + + +uwUser* newUser = new (std::nothrow) uwUser(bot->SQLDb); +assert( newUser != 0 ) ; + +newUser->setUserName(bot->removeSqlChars(st[1])); +newUser->setAccess(level); +newUser->setPassword(pass); +newUser->Insert(); +bot->addUser(newUser); + +bot->SendTo(theClient, PrivMsg, "Added %s with level %d", bot->removeSqlChars(st[1]).c_str(), level); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); +bot->MsgChanLog("%s ( %s ) added user %s with access %d", theClient->getNickName().c_str(), + theClient->getNickUserHost().c_str(), newUser->getUserName().c_str(), newUser->getAccess()); + + +return true; +} + +} // uwrld + +} // gnuworld Index: gnuworld-sithnet/mod.uworld/AGLCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/AGLCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/AGLCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,169 @@ +/* + * AGLCommand.cc + * + * AUTO-GLINE handler + * + * $Id: AGLCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + */ + +#include <string> +#include <cstdlib> +#include <iomanip> + +#include "uworld.h" +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ + +using std::string ; + +namespace uwrld +{ + +bool AGLCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); +short int operLevel = bot->getOperLevel(theClient); + +if( st.size() < 2 ) + { + // send help + Usage( theClient ) ; + return false ; + } + +string command = string_upper(st[1]); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "AGL %s", st.assemble(1).c_str()); +bot->MsgChanLog("%s ( %s ) - AGL %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +if(command == "LIST") + { + if(operLevel < levels::agl::list) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::list); + return false; + } + bot->listAGL(theClient, PrivMsg); + return true; + } + +if(command == "ADD") + { + if(operLevel < levels::agl::add) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::add); + return false; + } + + uwAGL* theAGL = bot->findAGL(st[2]); + if(theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry allready exists! Use AGL UPDATE <host>"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + string hostname; + + iClient* targetClient = Network->findNick(st[2]); + if(targetClient) + hostname = targetClient->getRealInsecureHost(); + else + { + string::size_type atPos = st[ 2 ].find_first_of( '@' ) ; + if( string::npos == atPos ) + hostname = st[2]; + else + hostname = st[2].substr( atPos + 1 ); + } + + theAGL = new (std::nothrow) uwAGL(bot->SQLDb); + assert( theAGL != 0 ) ; + + theAGL->setAGLHost(hostname); + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Insert(); + + bot->addAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I added a new AGL-entry for %s allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } + +if(command == "UPDATE") + { + if(operLevel < levels::agl::update) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Update(); + bot->updateAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I updated the AGL-entry for %s now allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } +if(command == "DEL") + { + if(operLevel < levels::agl::del) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + theAGL->Delete(); + bot->remAGL(theAGL); + bot->SendTo(theClient, PrivMsg, "I deleted the AGL-entry for %s", theAGL->getAGLHost().c_str()); + delete theAGL; + return true; + } + + + +Usage( theClient ); +return true; +} + +} +} + Index: gnuworld-sithnet/mod.uworld/BADCHANCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/BADCHANCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/BADCHANCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,133 @@ +/* + * BADCHANCommand.cc + * $Id: BADCHANCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" +#include "uwGline.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool BADCHANCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::gline::channel) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); + return false; + } + +int gLength = 0; +string reason = "No reason added for some reason"; +int requiredLevel = levels::gline::channel; + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "You need to badchan an existing channel!"); + return false; + } + +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + requiredLevel = levels::gline::permchannel; + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( requiredLevel < levels::gline::longterm ) + requiredLevel = levels::gline::longterm; + } + +if(operLevel < requiredLevel) + { + bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); + return false; + } + +uwGline* newGline = bot->findGline(theChan->getName()); +if(!newGline) +{ + newGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (newGline != NULL); + + newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + newGline->setAddedOn(::time(0)); + newGline->setHost(theChan->getName()); + newGline->setAddedLevel(requiredLevel); + newGline->setReason(reason); + if(gLength != 0) + newGline->setExpires(::time(0) + gLength ); + else + newGline->setExpires(0); + newGline->Insert(); + + //need to load the id + newGline->loadData(newGline->getHost()); + bot->addGline(newGline); + bot->SendTo(theClient, PrivMsg, "Badchan for %s added.", newGline->getHost().c_str()); + uwUser* theUser = bot->IsAuth(theClient); + if(!theUser) return false; + bot->addLog(theUser, theClient, "BADCHAN %s", st.assemble(1).c_str()); + + bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), + newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); + + server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength); + +} +return true; +} //badchancmd + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,72 @@ +/* + * CHANINFOCommand.cc + * + * Shows information about a channel + * + * $Id: CHANINFOCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + * + */ +#include <string> +//#include <cstdlib> +//#include <iomanip> + +#include "Network.h" +#include "uworld.h" +#include "StringTokenizer.h" +#include "levels.h" + + +namespace gnuworld +{ + +using std::string ; + +namespace uwrld +{ + +bool CHANINFOCommand::Exec( iClient* theClient, const string& Message ) +{ +StringTokenizer st( Message ); +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::chaninfo) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::opchan); + return false; + } + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "Unable to find channel %s", st[1].c_str()); + return true; + } + +bot->SendTo(theClient, PrivMsg, "Channel %s is mode %s", st[1].c_str(), theChan->getModeString().c_str()); +bot->SendTo(theClient, PrivMsg, "Created at time: %s", bot->convertToAscTime(theChan->getCreationTime())); +bot->SendTo(theClient, PrivMsg, "Number of channel users: %d", theChan->size()); + +#ifdef TOPIC_TRACK + bot->SendTo(theClient, PrivMsg, "Topic: %s", theChan->getTopic().c_str()); +#endif + +string username = "notLoggedIn"; +uwUser* theUser = bot->IsAuth(theClient); +if(theUser) username = theUser->getUserName(); +bot->addLog(username, theClient, "CHANINFO %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - CHANINFO %s", username.c_str(), + theClient->getNickUserHost().c_str(), st[1].c_str()); + + +return true ; +} + +} +} // namespace gnuworld Index: gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,51 @@ +/* + * CHECKNETCommand.cc + * $Id: CHECKNETCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool CHECKNETCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::checknet) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::checknet); + return false; + } + +bot->SendTo(theClient, PrivMsg, "Listing missing servers..."); +bot->listMissingServers(theClient, PrivMsg); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "CHECKNET"); +bot->MsgChanLog("%s ( %s ) - CHECKNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str() ); + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,238 @@ +/* + * CLEARCHANCommand.cc + * + * Clears all/some channel modes + * + */ + +#include <string> +#include <cstdlib> +#include <iomanip> +#include "Network.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" + +const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::vector ; +using gnuworld::iClient; + +namespace uwrld +{ + +bool CLEARCHANCommand::Exec( iClient* theClient, const string& Message ) +{ +StringTokenizer st( Message ) ; +bool Desynch = false; +bool PrivMsg = bot->SendPrivmsg(theClient); + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::clearchan) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::clearchan); + return false; + } + +if( st.size() < 2 ) + { + Usage( theClient ) ; + return true ; + } + + +Channel* theChan = Network->findChannel( st[ 1 ] ) ; +if( NULL == theChan ) + { + bot->Notice( theClient, "Unable to find channel %s", + st[ 1 ].c_str() ) ; + return true ; + } + +string doModes; //This holds the modes the user asked to be removed +string remModes = ""; //Holds the modes that we are removing +string args = ""; //Holds the arguments for the remModes + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "CLEARCHAN %s", theChan->getName().c_str()); +bot->MsgChanLog("%s ( %s ) - CLEARCHAN %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +//Check if the user specified the modes, if not assume he ment all of the modes +if(st.size() == 2) + doModes = "OBKLIM"; +else if(!strcasecmp(string_upper(st[ 2 ]).c_str(),"ALL")) + doModes = "OBKLINMSPT"; +else if(!strcasecmp(string_upper(st [ 2]).c_str(),"-D")) + Desynch = true; +else + doModes = string_upper(st [ 2 ]); + +if(Desynch) + { + vector<iClient*> KickVec; + bot->Join(theChan->getName(),"+i",0,true); + //bot->Mode(theChan,Channel::MODE_I); + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + KickVec.push_back(ptr->second->getClient()); + } + else + { + /* + its a +k user, need to make sure its not us + */ + if(strcmp(ptr->second->getClient()->getCharYYXXX().c_str(), + bot->getCharYYXXX().c_str())) + { + bot->Message(ptr->second->getClient(),"OPERPART %s" + ,theChan->getName().c_str()); + } + } + } + if(KickVec.size() > 0) + { + string reason = "Desynch clearing"; + bot->Kick(theChan,KickVec,reason); + } + bot->Part(theChan->getName()); + return true; + } + +for( string::size_type modePos = 0 ; modePos < doModes.size() ; ++modePos ) + { + switch( doModes[ modePos ] ) + { + case 'B': //Ban? + { + string ban; + string modes = "-"; + string args = ""; + Channel::banListSizeType end = theChan->banList_size(); + Channel::banIterator ptr = theChan->banList_begin() ; + for(Channel::banListSizeType i=0; i != end ;i++) + { + ban = *ptr; + ptr++; + args += ban + ' '; + modes+= "b"; + theChan->removeBan(ban); + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + break; + } + case 'O': //Chanops? + { + string modes = "-"; + string args = ""; + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_O)) + { + /* Don't deop +k things */ + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + modes+= 'o'; + args+= ptr->second->getCharYYXXX() + " "; + ptr->second->removeMode(ChannelUser::MODE_O); + } + } // If opped. + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer(theChan,modes + " " + args); + } + break; + case 'K': //Key? + if(theChan->getMode(Channel::MODE_K)) + { + theChan->removeMode(Channel::MODE_K); + remModes+= "k"; + args+= theChan->getKey() + " "; + theChan->setKey(""); + } + break; + case 'I': //Invite? + if(theChan->getMode(Channel::MODE_I)) + { + theChan->removeMode(Channel::MODE_I); + remModes+= "i"; + } + break; + case 'L': //Limit? + if(theChan->getMode(Channel::MODE_L)) + { + theChan->removeMode(Channel::MODE_L); + remModes+= "l"; + //args+= theChan->getLimit() + " "; + } + break; + case 'P': //Private? + if(theChan->getMode(Channel::MODE_P)) + { + theChan->removeMode(Channel::MODE_P); + remModes+= "p"; + } + break; + case 'S': //Secret? + if(theChan->getMode(Channel::MODE_S)) + { + theChan->removeMode(Channel::MODE_S); + remModes+= "s"; + } + break; + case 'M': //Moderated? + if(theChan->getMode(Channel::MODE_M)) + { + theChan->removeMode(Channel::MODE_M); + remModes+= "m"; + } + break; + case 'N': //No External Messages? + if(theChan->getMode(Channel::MODE_N)) + { + theChan->removeMode(Channel::MODE_N); + remModes+= "n"; + } + break; + case 'T': //Topic? + if(theChan->getMode(Channel::MODE_T)) + { + theChan->removeMode(Channel::MODE_T); + remModes+= "t"; + } + break; + default:; + } } +if(!remModes.empty()) + bot->ModeAsServer(theChan,"-" + remModes + " " + args); + + +return true; +} + +} +} Index: gnuworld-sithnet/mod.uworld/COPYING diff -u /dev/null gnuworld-sithnet/mod.uworld/COPYING:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/COPYING Sun Aug 31 11:35:10 2003 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Index: gnuworld-sithnet/mod.uworld/ChangeLog diff -u /dev/null gnuworld-sithnet/mod.uworld/ChangeLog:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/ChangeLog Sun Aug 31 11:35:10 2003 @@ -0,0 +1,17 @@ +2002-06-29 Jochen Meesters <Den...@pa...> + + * Added logging of commands to consolechan + * Levelcheck on commands added by ULtimaTe_ (the one who is to lazy to use this ChangeLog + * QUOTECommand and SAYCommand added + * Same goes for JOINCommand and PARTCommand + * And HELPCommand + +2002-06-28 Jochen Meesters <Den...@pa...> + + * ChangeLog: Erm, added one :-) + * WHOISCommand.cc: Guess what? Yeah, added. + * SCANCommand.cc: Hmmz, added (duh). + * TRANSLATECommand.cc: Sigh, why even ask? + * SERVLISTCommand.cc: bleh. + * CLEARCHANCommand.cc: bleh² + * INVITECommand.cc: ' ' (left blank on purpose) Index: gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,47 @@ +/* + * DEAUTHCommand.cc + */ + +//#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool DEAUTHCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) + { + bot->SendTo(theClient, PrivMsg, "You have to be logged in before you can DEAUTH"); + return false; + } + +bot->addLog(theUser, theClient, "DEAUTH"); +bot->MsgChanLog("%s ( %s ) - DEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +bot->deAuthUser(theClient->getCharYYXXX()); +bot->SendTo(theClient, PrivMsg, "You have successfully been deauthed! Cya!"); +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,68 @@ +/* + * DELSERVERCommand.cc + * $Id: DELSERVERCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool DELSERVERCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::delserver) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::delserver); + return false; + } + +uwServer* remServer = bot->findServer(st[1]); +if(!remServer) + { + bot->SendTo(theClient, PrivMsg, "No such server"); + return false; + } + +iServer* netServer = Network->findServerName(st[1]); +if(netServer) + { + bot->SendTo(theClient, PrivMsg, "Would you delink this server first please!"); + return false; + } + +bot->remServer(remServer); +bot->SendTo(theClient, PrivMsg, "Removed %s from my memory!", st[1].c_str()); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "DELSERVER %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - DELSERVER %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st[1].c_str()); + + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,70 @@ +/* + * FDEAUTHCommand.cc + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool FDEAUTHCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::fdeauth) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::fdeauth); + return false; + } + +iClient* targetClient = Network->findNick(st[1]); +if(!targetClient) + { + bot->SendTo(theClient, PrivMsg, "Can't find nick %s", st[1].c_str()); + return false; + } + +short int targetLevel = bot->getOperLevel(targetClient); +if(operLevel < targetLevel) + { + bot->SendTo(theClient, PrivMsg, "You can not deauthenticate users with access higher than your own!"); + return false; + } + +const uwUser* authUser = bot->IsAuth(targetClient); +if(!authUser) + { + bot->SendTo(theClient, PrivMsg, "User %s is not authed", st[1].c_str()); + return false; + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "FDEAUTH %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - FDEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +bot->deAuthUser(targetClient->getCharYYXXX()); +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/GLINECommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/GLINECommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/GLINECommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,304 @@ +/* + * GLINECommand.cc + * $Id: GLINECommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" +#include "uwGline.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool GLINECommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::gline::standard) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::standard); + return false; + } + +StringTokenizer::size_type pos = 1 ; +string username; +string hostname; +int gLength = 3600; +string reason = "No reason added for some reason"; +bool nickname = false; +bool channel = false; + +if(st[1][0] == '#') + channel = true; + +if(!channel) +{ + +string::size_type atPos = st[ pos ].find_first_of( '@' ) ; +if( string::npos == atPos ) + { + // specified nickname + iClient* targetClient = Network->findNick(st[1]); + if (targetClient) + { + nickname = true; + hostname = targetClient->getRealInsecureHost(); + username = targetClient->getUserName(); + } + } +else + { + username = st[ pos ].substr( 0, atPos ) ; + hostname = st[ pos ].substr( atPos + 1 ) ; + } + +int requiredLevel = levels::gline::standard; + +if(!nickname) +{ + int parseRes = bot->parseHost(hostname); + switch (parseRes) + { + case 0: // standard + requiredLevel = levels::gline::standard; + break; + case 1: // ablock + requiredLevel = levels::gline::ablock; + break; + case 2: // bblock + requiredLevel = levels::gline::bblock; + break; + case 3: // cblock + requiredLevel = levels::gline::cblock; + break; + case 4: // tld + requiredLevel = levels::gline::tld; + break; + case 5: // isp + requiredLevel = levels::gline::isp; + break; + + + case 20: // err_illegalhost + bot->SendTo(theClient, PrivMsg, "I don't think that would be a valid hostname!"); + return false; + + } //switch +} // if(!nickname) + +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( requiredLevel < levels::gline::longterm ) + requiredLevel = levels::gline::longterm; + } + +if(operLevel < requiredLevel) + { + bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); + return false; + } + +int matches = Network->countMatchingUserHost(username + "@" + hostname); +char theReason[255]; +sprintf(theReason, "[%d] %s", matches, reason.c_str()); + +/* debugging stuff +bot->MsgChanLog("DEBUG: username = %s", username.c_str()); +bot->MsgChanLog("DEBUG: hostname = %s (%s IP) and has %d dots", hostname.c_str(), bot->isIP(hostname) ? "IS" : "is GEEN", + bot->CountDots(hostname) ); +bot->MsgChanLog("DEBUG: length = %s%c", length.c_str(), unit); +bot->MsgChanLog("DEBUG: gLength = %d", gLength); +bot->MsgChanLog("DEBUG: reason = %s", reason.c_str()); +bot->MsgChanLog("DEBUG: matches = %d", matches); +*/ + +uwGline* newGline = bot->findGline(username + "@" + hostname); +if(!newGline) +{ + newGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (newGline != NULL); + + newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + newGline->setAddedOn(::time(0)); + newGline->setHost(username + "@" + hostname); + newGline->setAddedLevel(requiredLevel); + newGline->setReason(theReason); + newGline->setExpires(::time(0) + gLength ); + newGline->Insert(); + + //need to load the id + newGline->loadData(newGline->getHost()); + bot->addGline(newGline); + bot->SendTo(theClient, PrivMsg, "Gline %s added.", newGline->getHost().c_str()); + uwUser* theUser = bot->IsAuth(theClient); + if(!theUser) return false; + bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) added gline %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), + newGline->getHost().c_str(), bot->convertToAscTime(newGline->getExpires())); + + server->setGline(server->getName(), newGline->getHost(), theReason, gLength); + +} +return true; +} // if(!channel) + +// wel een channel-gline +if(operLevel < levels::gline::channel) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); + return false; + } + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "Can NOT gchan a non-existing channel"); + return false; + } + +bool longterm = false; +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( operLevel < levels::gline::longterm ) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::longterm); + return false; + } + longterm = true; + } + +uwGline* tmpGline; +iClient* tmpClient; +int affected = 0; +for( Channel::const_userIterator ptr = theChan->userList_begin() ; ptr != theChan->userList_end() ; ++ptr ) + { + tmpClient = ptr->second->getClient(); + if( !tmpClient->isOper() && !tmpClient->getMode(iClient::MODE_SERVICES) && !bot->IsAuth(tmpClient) ) + { + hostname = tmpClient->getRealInsecureHost(); + username = tmpClient->getUserName(); + if(username.substr(0,1) == "~") username = "~*"; + + int matches = Network->countMatchingUserHost(username + "@" + hostname); + char theReason[255]; + sprintf(theReason, "[%d] %s", matches, reason.c_str()); + + tmpGline = bot->findGline(username + "@" + hostname); + if(!tmpGline) + { + tmpGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (tmpGline != NULL); + + tmpGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + tmpGline->setAddedOn(::time(0)); + tmpGline->setHost(username + "@" + hostname); + tmpGline->setAddedLevel(longterm ? (levels::gline::longterm) : (levels::gline::channel)); + tmpGline->setReason(theReason); + tmpGline->setExpires(::time(0) + gLength ); + tmpGline->Insert(); + + //need to load the id + tmpGline->loadData(tmpGline->getHost()); + bot->addGline(tmpGline); + server->setGline(server->getName(), tmpGline->getHost(), theReason, gLength); + affected++; + } + } + } + +bot->SendTo(theClient, PrivMsg, "Gline for channel %s added. (%d users affected)", theChan->getName().c_str(), affected); +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) added gline for channel %s affecting %d users", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), theChan->getName().c_str(), affected); + +return true; +} //glinecmd + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,73 @@ +/* + * GLOBALCommand.cc + * $Id: + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "iServer.h" +#include "Network.h" +#include "server.h" + + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool GLOBALCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::global) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::global); + return false; + } + +xNetwork::serverIterator ptr = Network->server_begin(); +xNetwork::serverIterator end = Network->server_end(); + +for( ; ptr != end ; ptr++ ) + { + iServer* CurServer = ptr->second ; + if( NULL == CurServer) + { + continue ; + } + + if(!server->isJuped(CurServer)) + { + bot->Write("%s%s O $%s : \002%s\002 %s", + bot->getCharYY(), bot->getCharXXX(), + CurServer->getName().c_str(), "-=GLOBAL NOTICE=-", st.assemble(1).c_str()); + } + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "GLOBALNOTICE %s", st.assemble(1).c_str()); +bot->MsgChanLog("%s ( %s ) - GLOBALNOTICE %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/HELPCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/HELPCommand.cc:1.1 --- /dev/null Sun Aug 31 11:35:21 2003 +++ gnuworld-sithnet/mod.uworld/HELPCommand.cc Sun Aug 31 11:35:10 2003 @@ -0,0 +1,98 @@ +/* + * HELPCommand.cc + */ + +#include <string> +#include <sstream> +#include <cstdlib> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "constants.h" + +const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.1 2003/08/31 18:35:10 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool HELPComma... [truncated message content] |
From: Tim I. <dar...@us...> - 2003-09-01 12:20:41
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-09-01 12:20:39 UTC Modified files: src/Network.cc src/server.cc mod.cloner/cloner.cc Log message: GNUWorld Sync ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cloner/cloner.cc diff -u gnuworld-sithnet/mod.cloner/cloner.cc:1.1.1.1 gnuworld-sithnet/mod.cloner/cloner.cc:1.2 --- gnuworld-sithnet/mod.cloner/cloner.cc:1.1.1.1 Mon Aug 18 13:30:37 2003 +++ gnuworld-sithnet/mod.cloner/cloner.cc Mon Sep 1 05:20:29 2003 @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cloner.cc,v 1.1.1.1 2003/08/18 20:30:37 darthsidious_ Exp $ + * $Id: cloner.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $ */ #include <new> @@ -43,7 +43,7 @@ #include "misc.h" #include "ELog.h" -RCSTAG("$Id: cloner.cc,v 1.1.1.1 2003/08/18 20:30:37 darthsidious_ Exp $"); +RCSTAG("$Id: cloner.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $"); namespace gnuworld { @@ -51,7 +51,6 @@ using std::vector ; using std::endl ; using std::stringstream ; -using std::ends ; using std::string ; /* @@ -201,9 +200,14 @@ if( st.size() > 1 ) { - topic = st[ 1 ] ; + topic = string_upper( st[ 1 ] ) ; } +//elog << "cloner::OnPrivateMessage> command: " +// << command +// << ", topic: " +// << endl ; + if( command == "SHOWCOMMANDS" ) { if( st.size() < 1 ) @@ -331,8 +335,7 @@ stringstream s ; s << (*ptr)->getCharYYXXX() << " J " - << chanName - << ends ; + << chanName ; MyUplink->Write( s ) ; } @@ -360,13 +363,12 @@ stringstream s ; s << (*ptr)->getCharYYXXX() << " L " - << chanName - << ends ; + << chanName ; MyUplink->Write( s ) ; } } - if( st.size() >= 2 ) + if( st.size() > 2 ) { string chanName( st[ 1 ] ) ; if( chanName[ 0 ] != '#' ) @@ -384,8 +386,7 @@ << " L " << chanName << " :" - << partReason - << ends ; + << partReason ; MyUplink->Write( s ) ; } @@ -400,37 +401,22 @@ return ; } - if( st.size() == 1 ) - { - for( list< iClient* >::const_iterator ptr = clones.begin(), - endPtr = clones.end() ; ptr != endPtr ; ++ptr ) - { - MyUplink->DetachClient( *ptr ) ; -// stringstream s ; -// s << (*ptr)->getCharYYXXX() -// << " Q :Quitting" -// << ends ; - -// MyUplink->Write( s ) ; - } - } - + string quitMsg ; if( st.size() >= 2 ) { - string quitMsg( st.assemble(1).c_str() ) ; + quitMsg = st.assemble( 1 ) ; + } for( list< iClient* >::const_iterator ptr = clones.begin(), - endPtr = clones.end() ; ptr != endPtr ; ++ptr ) + endPtr = clones.end() ; ptr != endPtr ; ++ptr { - stringstream s ; - s << (*ptr)->getCharYYXXX() - << " Q :" - << quitMsg - << ends ; - - MyUplink->Write( s ) ; + if( MyUplink->DetachClient( *ptr, quitMsg ) ) + { + delete *ptr ; } } + clones.clear() ; + } // KILLALL/QUITALL else if( command == "SAYALL" || command == "MSGALL" ) { @@ -464,8 +450,7 @@ << " P " << chanOrNickName << " :" - << privMsg - << ends ; + << privMsg ; MyUplink->Write( s ) ; } @@ -504,8 +489,7 @@ << chanOrNickName << " :\001ACTION " << action - << "\001" - << ends ; + << "\001" ; MyUplink->Write( s ) ; } @@ -542,8 +526,7 @@ << " O " << chanOrNickName << " :" - << notice - << ends ; + << notice ; MyUplink->Write( s ) ; } @@ -587,17 +570,10 @@ void cloner::addClone() { -//char buf[ 4 ] = { 0 } ; - // The XXX doesn't matter here, the core will choose an // appropriate value. string yyxxx( fakeServer->getCharYY() + "]]]" ) ; -//inttobase64( buf, Network->countClients( fakeServer ) + 1, 3 ) ; -//buf[ 3 ] = 0 ; - -//yyxxx += buf ; - iClient* newClient = new iClient( fakeServer->getIntYY(), yyxxx, @@ -607,7 +583,7 @@ randomHost(), randomHost(), cloneMode, - "", + string(), cloneDescription, ::time( 0 ) ) ; assert( newClient != 0 ); Index: gnuworld-sithnet/src/Network.cc diff -u gnuworld-sithnet/src/Network.cc:1.1.1.1 gnuworld-sithnet/src/Network.cc:1.2 --- gnuworld-sithnet/src/Network.cc:1.1.1.1 Mon Aug 18 13:31:26 2003 +++ gnuworld-sithnet/src/Network.cc Mon Sep 1 05:20:29 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: Network.cc,v 1.1.1.1 2003/08/18 20:31:26 darthsidious_ Exp $ + * $Id: Network.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $ */ #include <new> @@ -44,7 +44,7 @@ #include "ip.h" #include "config.h" -RCSTAG( "$Id: Network.cc,v 1.1.1.1 2003/08/18 20:31:26 darthsidious_ Exp $" ) ; +RCSTAG( "$Id: Network.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $" ) ; namespace gnuworld { @@ -131,9 +131,9 @@ return false ; } -elog << "xNetwork::addClient(xClient)> Added client: " - << *newClient - << endl ; +//elog << "xNetwork::addClient(xClient)> Added client: " +// << *newClient +// << endl ; return true ; } @@ -374,7 +374,7 @@ { assert( theClient != 0 ) ; -return removeClient( theClient->getIntYY(), theClient->getIntXXX() ) ; +return removeClient( theClient->getIntYYXXX() ) ; } xClient* xNetwork::removeLocalClient( xClient* theClient ) @@ -1090,7 +1090,7 @@ } // Make sure the nickname does not collide -if( findFakeNick( fakeClient->getNickName() ) != 0 ) +if( findNick( fakeClient->getNickName() ) != 0 ) { elog << "xNetwork::addFakeClient> Found matching nickname: " << fakeClient->getNickName() @@ -1179,10 +1179,10 @@ fakeClient->getIntYYXXX() ) ; if( cItr == fakeClient_end() ) { - elog << "xNetwork::removeFakeClient> Unable to find fake " - << "client: " - << *fakeClient - << endl ; +// elog << "xNetwork::removeFakeClient> Unable to find fake " +// << "client: " +// << *fakeClient +// << endl ; } else { Index: gnuworld-sithnet/src/server.cc diff -u gnuworld-sithnet/src/server.cc:1.1.1.1 gnuworld-sithnet/src/server.cc:1.2 --- gnuworld-sithnet/src/server.cc:1.1.1.1 Mon Aug 18 13:31:33 2003 +++ gnuworld-sithnet/src/server.cc Mon Sep 1 05:20:29 2003 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: server.cc,v 1.1.1.1 2003/08/18 20:31:33 darthsidious_ Exp $ + * $Id: server.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $ */ #include <sys/time.h> @@ -71,7 +71,7 @@ #include "ConnectionHandler.h" #include "Connection.h" -RCSTAG( "$Id: server.cc,v 1.1.1.1 2003/08/18 20:31:33 darthsidious_ Exp $" ) ; +RCSTAG( "$Id: server.cc,v 1.2 2003/09/01 12:20:29 darthsidious_ Exp $" ) ; namespace gnuworld { @@ -123,7 +123,6 @@ elog << "Uplink Port: " << Port << endl ; elog << "Server Name: " << ServerName << endl ; elog << "Server Description: " << ServerDescription << endl ; -elog << endl ; //elog << "xServer::charYY> " << getCharYY() << endl ; //elog << "xServer::charXXX> " << getCharXXX() << endl ; @@ -329,9 +328,10 @@ } // while() -elog << "xServer> Loaded " +elog << "Loaded " << commandMap.size() << " command handlers" + << endl << endl ; commandMapFile.close() ; @@ -943,7 +943,7 @@ } // Set the intXXX/charXXX to the max possible -fakeServer->setIntXXX( 64 * 64 * 64 ) ; +fakeServer->setIntXXX( 64 * 64 * 64 - 1 ) ; BurstServer( fakeServer ) ; @@ -1294,7 +1294,7 @@ Client->getHostName(), Client->getHostName(), Client->getModes(), - "", + string(), Client->getDescription(), ::time( 0 ) ) ; assert( theIClient != 0 ) ; @@ -1331,6 +1331,10 @@ Client->BurstGlines() ; } +elog << "Successfully loaded client module: " + << theIClient->getNickName() + << endl ; + // Success return true ; } @@ -3993,7 +3997,8 @@ case 'm': case 'p': case 's': - // No big deal, let the network deal with any + // No big deal, let the network deal +with any // problems break ; default: @@ -4274,10 +4279,17 @@ << endl ; return false ; } - -Write( "%s Q :%s", - fakeClient->getCharYYXXX().c_str(), - quitMessage.c_str() ) ; +if( !quitMessage.empty() ) ; + { + Write( "%s Q :%s", + fakeClient->getCharYYXXX().c_str(), + quitMessgae.c_str() ) ; + } +else + { + Write( "%s Q :Exiting", + fakeClient->getCharYYXXX().c_str() ) ; + } return true ; } ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 18:25:22
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 16:47:35 UTC Modified files: mod.cservice/Makefile.am mod.cservice/Makefile.in Log message: Temporarily Removed Compilation of Commands:- ADDUSERID, ADMINKILL, KILL until fixed. you may need to run automake, etc for the module to compile ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/Makefile.am diff -u gnuworld-sithnet/mod.cservice/Makefile.am:1.1.1.1 gnuworld-sithnet/mod.cservice/Makefile.am:1.2 --- gnuworld-sithnet/mod.cservice/Makefile.am:1.1.1.1 Sun Oct 19 10:45:56 2003 +++ gnuworld-sithnet/mod.cservice/Makefile.am Fri Oct 24 09:47:25 2003 @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# "$Id: Makefile.am,v 1.1.1.1 2003/10/19 17:45:56 darthsidious_ Exp $" +# "$Id: Makefile.am,v 1.2 2003/10/24 16:47:25 darthsidious_ Exp $" lib_LTLIBRARIES = libcservice.la libcservice_la_LDFLAGS = -module -export-dynamic -L@PGSQL_LIB@ \ @@ -18,8 +18,6 @@ ACCESSCommand.cc \ ADDCOMMENTCommand.cc \ ADDUSERCommand.cc \ - ADDUSERIDCommand.cc \ - ADMINKILLCommand.cc \ BANCommand.cc \ BANLISTCommand.cc \ CHANINFOCommand.cc \ @@ -32,7 +30,6 @@ ISREGCommand.cc \ JOINCommand.cc \ KICKCommand.cc \ - KILLCommand.cc \ LBANLISTCommand.cc \ LOGINCommand.cc \ MODINFOCommand.cc \ Index: gnuworld-sithnet/mod.cservice/Makefile.in diff -u gnuworld-sithnet/mod.cservice/Makefile.in:1.1.1.1 gnuworld-sithnet/mod.cservice/Makefile.in:1.2 --- gnuworld-sithnet/mod.cservice/Makefile.in:1.1.1.1 Sun Oct 19 10:46:05 2003 +++ gnuworld-sithnet/mod.cservice/Makefile.in Fri Oct 24 09:47:25 2003 @@ -14,7 +14,7 @@ @SET_MAKE@ -# "$Id: Makefile.in,v 1.1.1.1 2003/10/19 17:46:05 darthsidious_ Exp $" +# "$Id: Makefile.in,v 1.2 2003/10/24 16:47:25 darthsidious_ Exp $" srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -184,8 +184,6 @@ ACCESSCommand.cc \ ADDCOMMENTCommand.cc \ ADDUSERCommand.cc \ - ADDUSERIDCommand.cc \ - ADMINKILLCommand.cc \ BANCommand.cc \ BANLISTCommand.cc \ CHANINFOCommand.cc \ @@ -198,7 +196,6 @@ ISREGCommand.cc \ JOINCommand.cc \ KICKCommand.cc \ - KILLCommand.cc \ LBANLISTCommand.cc \ LOGINCommand.cc \ MODINFOCommand.cc \ @@ -271,8 +268,7 @@ libcservice_la-ACCESSCommand.lo \ libcservice_la-ADDCOMMENTCommand.lo \ libcservice_la-ADDUSERCommand.lo \ - libcservice_la-ADDUSERIDCommand.lo \ - libcservice_la-ADMINKILLCommand.lo libcservice_la-BANCommand.lo \ + libcservice_la-BANCommand.lo \ libcservice_la-BANLISTCommand.lo \ libcservice_la-CHANINFOCommand.lo \ libcservice_la-CLEARMODECommand.lo \ @@ -280,7 +276,7 @@ libcservice_la-FORCECommand.lo libcservice_la-HELPCommand.lo \ libcservice_la-INVITECommand.lo libcservice_la-ISREGCommand.lo \ libcservice_la-JOINCommand.lo libcservice_la-KICKCommand.lo \ - libcservice_la-KILLCommand.lo libcservice_la-LBANLISTCommand.lo \ + libcservice_la-LBANLISTCommand.lo \ libcservice_la-LOGINCommand.lo libcservice_la-MODINFOCommand.lo \ libcservice_la-MOTDCommand.lo libcservice_la-NEWPASSCommand.lo \ libcservice_la-NOTECommand.lo libcservice_la-OPCommand.lo \ @@ -317,8 +313,6 @@ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libcservice_la-ACCESSCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-ADDCOMMENTCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-ADDUSERCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-ADMINKILLCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-BANCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-BANLISTCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-CHANINFOCommand.Plo \ @@ -331,7 +325,6 @@ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-ISREGCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-JOINCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-KICKCommand.Plo \ -@AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-KILLCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-LBANLISTCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-LOGINCommand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/libcservice_la-MODINFOCommand.Plo \ @@ -439,8 +432,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ACCESSCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ADDCOMMENTCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ADDUSERCommand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ADMINKILLCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-BANCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-BANLISTCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-CHANINFOCommand.Plo@am__quote@ @@ -453,7 +444,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-ISREGCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-JOINCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-KICKCommand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-KILLCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-LBANLISTCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-LOGINCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcservice_la-MODINFOCommand.Plo@am__quote@ @@ -900,72 +890,6 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADDUSERCommand.lo `test -f 'ADDUSERCommand.cc' || echo '$(srcdir)/'`ADDUSERCommand.cc -libcservice_la-ADDUSERIDCommand.o: ADDUSERIDCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADDUSERIDCommand.o -MD -MP -MF "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADDUSERIDCommand.o `test -f 'ADDUSERIDCommand.cc' || echo '$(srcdir)/'`ADDUSERIDCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADDUSERIDCommand.cc' object='libcservice_la-ADDUSERIDCommand.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADDUSERIDCommand.o `test -f 'ADDUSERIDCommand.cc' || echo '$(srcdir)/'`ADDUSERIDCommand.cc - -libcservice_la-ADDUSERIDCommand.obj: ADDUSERIDCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADDUSERIDCommand.obj -MD -MP -MF "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADDUSERIDCommand.obj `if test -f 'ADDUSERIDCommand.cc'; then $(CYGPATH_W) 'ADDUSERIDCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ADDUSERIDCommand.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADDUSERIDCommand.cc' object='libcservice_la-ADDUSERIDCommand.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADDUSERIDCommand.obj `if test -f 'ADDUSERIDCommand.cc'; then $(CYGPATH_W) 'ADDUSERIDCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ADDUSERIDCommand.cc'; fi` - -libcservice_la-ADDUSERIDCommand.lo: ADDUSERIDCommand.cc -@am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADDUSERIDCommand.lo -MD -MP -MF "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADDUSERIDCommand.lo `test -f 'ADDUSERIDCommand.cc' || echo '$(srcdir)/'`ADDUSERIDCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo" "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Plo"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADDUSERIDCommand.cc' object='libcservice_la-ADDUSERIDCommand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.Plo' tmpdepfile='$(DEPDIR)/libcservice_la-ADDUSERIDCommand.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADDUSERIDCommand.lo `test -f 'ADDUSERIDCommand.cc' || echo '$(srcdir)/'`ADDUSERIDCommand.cc - -libcservice_la-ADMINKILLCommand.o: ADMINKILLCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADMINKILLCommand.o -MD -MP -MF "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADMINKILLCommand.o `test -f 'ADMINKILLCommand.cc' || echo '$(srcdir)/'`ADMINKILLCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADMINKILLCommand.cc' object='libcservice_la-ADMINKILLCommand.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADMINKILLCommand.o `test -f 'ADMINKILLCommand.cc' || echo '$(srcdir)/'`ADMINKILLCommand.cc - -libcservice_la-ADMINKILLCommand.obj: ADMINKILLCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADMINKILLCommand.obj -MD -MP -MF "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADMINKILLCommand.obj `if test -f 'ADMINKILLCommand.cc'; then $(CYGPATH_W) 'ADMINKILLCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ADMINKILLCommand.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADMINKILLCommand.cc' object='libcservice_la-ADMINKILLCommand.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADMINKILLCommand.obj `if test -f 'ADMINKILLCommand.cc'; then $(CYGPATH_W) 'ADMINKILLCommand.cc'; else $(CYGPATH_W) '$(srcdir)/ADMINKILLCommand.cc'; fi` - -libcservice_la-ADMINKILLCommand.lo: ADMINKILLCommand.cc -@am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-ADMINKILLCommand.lo -MD -MP -MF "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-ADMINKILLCommand.lo `test -f 'ADMINKILLCommand.cc' || echo '$(srcdir)/'`ADMINKILLCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo" "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Plo"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-ADMINKILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADMINKILLCommand.cc' object='libcservice_la-ADMINKILLCommand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.Plo' tmpdepfile='$(DEPDIR)/libcservice_la-ADMINKILLCommand.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-ADMINKILLCommand.lo `test -f 'ADMINKILLCommand.cc' || echo '$(srcdir)/'`ADMINKILLCommand.cc - libcservice_la-BANCommand.o: BANCommand.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-BANCommand.o -MD -MP -MF "$(DEPDIR)/libcservice_la-BANCommand.Tpo" \ @am__fastdepCXX_TRUE@ -c -o libcservice_la-BANCommand.o `test -f 'BANCommand.cc' || echo '$(srcdir)/'`BANCommand.cc; \ @@ -1361,39 +1285,6 @@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-KICKCommand.Plo' tmpdepfile='$(DEPDIR)/libcservice_la-KICKCommand.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-KICKCommand.lo `test -f 'KICKCommand.cc' || echo '$(srcdir)/'`KICKCommand.cc - -libcservice_la-KILLCommand.o: KILLCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-KILLCommand.o -MD -MP -MF "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-KILLCommand.o `test -f 'KILLCommand.cc' || echo '$(srcdir)/'`KILLCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" "$(DEPDIR)/libcservice_la-KILLCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='KILLCommand.cc' object='libcservice_la-KILLCommand.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-KILLCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-KILLCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-KILLCommand.o `test -f 'KILLCommand.cc' || echo '$(srcdir)/'`KILLCommand.cc - -libcservice_la-KILLCommand.obj: KILLCommand.cc -@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-KILLCommand.obj -MD -MP -MF "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-KILLCommand.obj `if test -f 'KILLCommand.cc'; then $(CYGPATH_W) 'KILLCommand.cc'; else $(CYGPATH_W) '$(srcdir)/KILLCommand.cc'; fi`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" "$(DEPDIR)/libcservice_la-KILLCommand.Po"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='KILLCommand.cc' object='libcservice_la-KILLCommand.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-KILLCommand.Po' tmpdepfile='$(DEPDIR)/libcservice_la-KILLCommand.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-KILLCommand.obj `if test -f 'KILLCommand.cc'; then $(CYGPATH_W) 'KILLCommand.cc'; else $(CYGPATH_W) '$(srcdir)/KILLCommand.cc'; fi` - -libcservice_la-KILLCommand.lo: KILLCommand.cc -@am__fastdepCXX_TRUE@ if $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-KILLCommand.lo -MD -MP -MF "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" \ -@am__fastdepCXX_TRUE@ -c -o libcservice_la-KILLCommand.lo `test -f 'KILLCommand.cc' || echo '$(srcdir)/'`KILLCommand.cc; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo" "$(DEPDIR)/libcservice_la-KILLCommand.Plo"; \ -@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/libcservice_la-KILLCommand.Tpo"; exit 1; \ -@am__fastdepCXX_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='KILLCommand.cc' object='libcservice_la-KILLCommand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libcservice_la-KILLCommand.Plo' tmpdepfile='$(DEPDIR)/libcservice_la-KILLCommand.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -c -o libcservice_la-KILLCommand.lo `test -f 'KILLCommand.cc' || echo '$(srcdir)/'`KILLCommand.cc libcservice_la-LBANLISTCommand.o: LBANLISTCommand.cc @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcservice_la_CXXFLAGS) $(CXXFLAGS) -MT libcservice_la-LBANLISTCommand.o -MD -MP -MF "$(DEPDIR)/libcservice_la-LBANLISTCommand.Tpo" \ ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 18:58:49
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 17:45:16 UTC Modified files: mod.cservice/SETCommand.cc Log message: oops..again. ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/SETCommand.cc diff -u gnuworld-sithnet/mod.cservice/SETCommand.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/SETCommand.cc:1.2 --- gnuworld-sithnet/mod.cservice/SETCommand.cc:1.1.1.1 Sun Oct 19 10:46:11 2003 +++ gnuworld-sithnet/mod.cservice/SETCommand.cc Fri Oct 24 10:45:05 2003 @@ -33,7 +33,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: SETCommand.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $ + * $Id: SETCommand.cc,v 1.2 2003/10/24 17:45:05 darthsidious_ Exp $ */ #include <string> @@ -45,7 +45,7 @@ #include "responses.h" #include "cservice_config.h" -const char SETCommand_cc_rcsId[] = "$Id: SETCommand.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $" ; +const char SETCommand_cc_rcsId[] = "$Id: SETCommand.cc,v 1.2 2003/10/24 17:45:05 darthsidious_ Exp $" ; namespace gnuworld { @@ -672,6 +672,42 @@ option.c_str(), theChan->getName().c_str(), theChan->getFlag(sqlChannel::F_STRICTOP) ? "ON" : "OFF"); + return true; + } + + if(option == "STRICTVOICE") + { + if(level < level::set::strictvoice) + { + bot->Notice(theClient, + bot->getResponse(theUser, + language::insuf_access, + string("You do not have enough access!"))); + return true; + } + if(value == "ON") + { + theChan->setFlag(sqlChannel::F_STRICTVOICE); + if (tmpChan) bot->devoiceAllUnAuthedOnChan(tmpChan); + } + else if(value == "OFF") theChan->removeFlag(sqlChannel::F_STRICTVOICE); + else + { + bot->Notice(theClient, + bot->getResponse(theUser, + language::set_cmd_syntax_on_off, + string("value of %s must be ON or OFF")).c_str(), + option.c_str()); + return true; + } + theChan->commit(); + bot->Notice(theClient, + bot->getResponse(theUser, + language::set_cmd_status, + string("%s for %s is %s")).c_str(), + option.c_str(), + theChan->getName().c_str(), + theChan->getFlag(sqlChannel::F_STRICTVOICE) ? "ON" : "OFF"); return true; } ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 20:30:10
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 20:28:34 UTC Added files: doc/uworld.commands.sql doc/uworld.sql doc/uworld.addme.sql Log message: Added mod.uworld SQL schema ---------------------- diff included ---------------------- Index: gnuworld-sithnet/doc/uworld.addme.sql diff -u /dev/null gnuworld-sithnet/doc/uworld.addme.sql:1.1 --- /dev/null Fri Oct 24 13:28:34 2003 +++ gnuworld-sithnet/doc/uworld.addme.sql Fri Oct 24 13:28:23 2003 @@ -0,0 +1,6 @@ +-- Add level 1000 admin +-- ULtimaTe_ <ult...@wo...> 02/02/2002 +-- $Id: uworld.addme.sql,v 1.1 2003/10/24 20:28:23 darthsidious_ Exp $ + +INSERT INTO users (user_name,password,access) +VALUES ('Spike','07d976a29bdb3ff42e19c102852151b28097bbad',1000); Index: gnuworld-sithnet/doc/uworld.commands.sql diff -u /dev/null gnuworld-sithnet/doc/uworld.commands.sql:1.1 --- /dev/null Fri Oct 24 13:28:34 2003 +++ gnuworld-sithnet/doc/uworld.commands.sql Fri Oct 24 13:28:23 2003 @@ -0,0 +1,131 @@ +--commands db + +-- Zap everything! +DELETE FROM commands; + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('ACCESS','returns the bots access list',0,'This command returns the bots access list'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES ('LOGIN','Authenticates you with the bot',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES ('NEWPASS','sets a new password for you',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('INVITE','invites you to a channel',100,'This command invites you to a channel'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SERVLIST','returns the list of currently linked servers',100,'This returns the list of currently linked servers'); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('WHOIS','gives more info on a nick',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CHANINFO','gives you info about a chan',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('TRANSLATE','translates a numeric into a nickname',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('MODE','set mode thru the bot',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CLEARCHAN','reset a channel modes',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SCAN','search a certain hostname on the network',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('ADDUSER','adds a user to my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMUSER','removes a user from my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('MODUSER','modifies a user in my database',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SAY','make the bot talk',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('JOIN','make the bot join a channel',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('PART','make the bot leave a channel',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('INVME','invites you to console channel',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('QUOTE','a coder toy',950,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GODLIKE','for my special god',1000,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('DEAUTH','deauthenticates you',0,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('FDEAUTH','force a user to deauthenticate',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('OPCHAN','ops a user in an opless channel',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('WALLOPS','sends a wallusers message',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GLOBAL','sends a global notice',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SHUTDOWN','shuts bot and server down',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('JUPE','adds a server jupe',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('GLINE','adds a gline',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMGLINE','removes a gline',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LIST','lists glines,badchans,agl,...',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('UPTIME','gives the bots uptime',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('OMSG','Uworlds Private Operator club',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('SUSPEND','suspends a user',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('UNSUSPEND','unsuspends a user',700,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('BADCHAN','adds a banchan',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('REMBADCHAN','removes a banchan',600,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('DELSERVER','deletes a server from the memory',800,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LEARNNET','gets to know the network again',900,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('CHECKNET','checks for missing servers',400,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('LASTCOMM','shows the last commands i received',100,''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('AGL', 'modifies the AGL-table', 700, ''); + +INSERT INTO commands (command,shortdesc,level,longdesc) +VALUES('STATUS', 'shows the internal status', 100, ''); + Index: gnuworld-sithnet/doc/uworld.sql diff -u /dev/null gnuworld-sithnet/doc/uworld.sql:1.1 --- /dev/null Fri Oct 24 13:28:34 2003 +++ gnuworld-sithnet/doc/uworld.sql Fri Oct 24 13:28:23 2003 @@ -0,0 +1,48 @@ +-- cyclebot database script ;) +-- ULtimaTe_ <ult...@wo...> 02/02/2002 (all those 2's ;)) +-- $Id: uworld.sql,v 1.1 2003/10/24 20:28:23 darthsidious_ Exp $ + +CREATE TABLE users ( + + id SERIAL, + user_name TEXT NOT NULL, + password VARCHAR (40) NOT NULL, + access INT4 NOT NULL DEFAULT '0', + flags INT2 NOT NULL DEFAULT '0', + suspend_expires INT4, + suspend_level INT4 +); + +CREATE TABLE glines ( + Id SERIAL, + Host VARCHAR(128) UNIQUE NOT NULL, + AddedBy VARCHAR(128) NOT NULL, + AddedOn INT4 NOT NULL, + AddedLevel INT4 NOT NULL DEFAULT '100', + ExpiresAt INT4 NOT NULL, + Reason VARCHAR(255) + ); + +CREATE TABLE commands ( + command TEXT UNIQUE NOT NULL, + shortdesc VARCHAR (128) NOT NULL, + level INT4 NOT NULL DEFAULT '0', + longdesc VARCHAR (512) +); + +CREATE TABLE logs ( + Id SERIAL, + username TEXT NOT NULL, + nickuserhost VARCHAR(128) NOT NULL, + ts INT4 NOT NULL, + log VARCHAR(255) + ); + +CREATE TABLE AGL ( + AGL_Host VARCHAR(128) UNIQUE NOT NULL, + Connections INT4 NOT NULL, + AddedBy VARCHAR(128) NOT NULL, + AddedOn INT4 NOT NULL + ); + + ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 20:36:38
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 20:34:05 UTC Modified files: bin/GNUWorld.example.conf.in Added files: bin/uworld.example.conf.in Log message: Added Uworld Module configuration files ---------------------- diff included ---------------------- Index: gnuworld-sithnet/bin/GNUWorld.example.conf.in diff -u gnuworld-sithnet/bin/GNUWorld.example.conf.in:1.1.1.1 gnuworld-sithnet/bin/GNUWorld.example.conf.in:1.2 --- gnuworld-sithnet/bin/GNUWorld.example.conf.in:1.1.1.1 Sun Oct 19 10:43:33 2003 +++ gnuworld-sithnet/bin/GNUWorld.example.conf.in Fri Oct 24 13:33:55 2003 @@ -1,19 +1,19 @@ -# $Id: GNUWorld.example.conf.in,v 1.1.1.1 2003/10/19 17:43:33 darthsidious_ Exp $ +# $Id: GNUWorld.example.conf.in,v 1.2 2003/10/24 20:33:55 darthsidious_ Exp $ # GNUWorld Core Configuration File # uplink = 192.168.181.111 port = 4400 password = 54321 -name = services.undernet.org -description = UnderNet Services +name = services.sithnet.org +description = SithNet Services numeric = 51 # Set this variable to yes if you want the server to attempt # to auto_reconnect when a connection is terminated, set # to no otherwise. # Be careful using this. -auto_reconnect = yes +auto_reconnect = no # There is currently a bug in ircu which causes the first client # of a multiclient server to be lost, but only if maxclients is set @@ -23,7 +23,7 @@ # This is the variable which defines the host suffix to be concatenated # onto the user's account name for host hiding. -hidden_host_suffix = .users.undernet.org +hidden_host_suffix = .users.sithnet.org # command_map is the name of the file which contains the mappings # from module filenames (of server command handlers) to the @@ -45,6 +45,7 @@ #module = libgnutest.la gnutest.example.conf #module = libclientExample.la clientExample.example.conf #module = libdronescan.la dronescan.example.conf +#module = libuworld.la = uworld.example.conf ################################################# # It is safe to leave the rest of this file alone Index: gnuworld-sithnet/bin/uworld.example.conf.in diff -u /dev/null gnuworld-sithnet/bin/uworld.example.conf.in:1.1 --- /dev/null Fri Oct 24 13:34:05 2003 +++ gnuworld-sithnet/bin/uworld.example.conf.in Fri Oct 24 13:33:55 2003 @@ -0,0 +1,41 @@ +# cyclebot Configuration File. +# +# sql_host = Hostname/IP of the PostGreSQL server. + +sql_host = 127.0.0.1 +sql_port = 5432 + +# sql_db = Name of the database. + +sql_db = uworld + +# sql_user is the username to pass to PostGreSQL on connection. +# Useful if your account name is not the same as your Database +# username. + +sql_user = gnuworld +sql_pass = '' + +# General 'Bot' options. + +username = UWorld +nickname = Uworld +hostname = SithNet.org +userdescription = GNUWorld Alternative Operator Services +mode = +iodk + +# output channel +msg_channel = #UWorld.Console + +# Expired_Interval +Expired_interval = 60 + +# dbinterval +dbinterval = 60 + +# maximum number of logs held in the memory +maxLogs = 30 + +# length of the autoglines +aglLength = 300 + ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 21:04:51
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 21:03:00 UTC Modified files: Makefile.in Makefile.am Log message: Updated Makefiles to allow for compilation of mod.uworld ---------------------- diff included ---------------------- Index: gnuworld-sithnet/Makefile.am diff -u gnuworld-sithnet/Makefile.am:1.1.1.1 gnuworld-sithnet/Makefile.am:1.2 --- gnuworld-sithnet/Makefile.am:1.1.1.1 Sun Oct 19 10:43:31 2003 +++ gnuworld-sithnet/Makefile.am Fri Oct 24 14:02:50 2003 @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.1.1.1 2003/10/19 17:43:31 darthsidious_ Exp $ +## $Id: Makefile.am,v 1.2 2003/10/24 21:02:50 darthsidious_ Exp $ ## test @SET_MAKE@ @@ -39,6 +39,10 @@ MODSTATS = mod.stats endif +if COND_MODUWORLD + MODUWORLD = mod.uworld +endif + if COND_TESTDIR TESTDIR = test endif @@ -57,6 +61,7 @@ $(MODNICKSERV) \ $(MODSCANNER) \ $(MODSTATS) \ + $(MODUWORLD) \ $(TESTDIR) \ $(DBDIR) \ libircu @@ -71,6 +76,7 @@ bin/nickserv.example.conf.in \ bin/scanner.example.conf.in \ bin/stats.example.conf.in \ + bin/uworld.example.conf.in \ bin/server_command_map.in \ contrib/00INDEX.TXT \ contrib/chktrans.py \ @@ -119,6 +125,9 @@ doc/update_themes.sql \ doc/update_tzmove_l.sql \ doc/update_tzmove_r.sql \ + doc/uworld.sql \ + doc/uworld.commands.sql \ + doc/uworld.addme.sql \ doc/cmaster/website/faq.html \ doc/cmaster/website/index.html \ doc/cmaster/website/install.html \ Index: gnuworld-sithnet/Makefile.in diff -u gnuworld-sithnet/Makefile.in:1.1.1.1 gnuworld-sithnet/Makefile.in:1.2 --- gnuworld-sithnet/Makefile.in:1.1.1.1 Sun Oct 19 10:43:32 2003 +++ gnuworld-sithnet/Makefile.in Fri Oct 24 14:02:49 2003 @@ -68,6 +68,8 @@ COND_MODSCANNER_TRUE = @COND_MODSCANNER_TRUE@ COND_MODSTATS_FALSE = @COND_MODSTATS_FALSE@ COND_MODSTATS_TRUE = @COND_MODSTATS_TRUE@ +COND_MODUWORLD_FALSE = @COND_MODUWORLD_FALSE@ +COND_MODUWORLD_TRUE = @COND_MODUWORLD_TRUE@ COND_TESTDIR_FALSE = @COND_TESTDIR_FALSE@ COND_TESTDIR_TRUE = @COND_TESTDIR_TRUE@ CPP = @CPP@ @@ -181,6 +183,8 @@ @COND_MODSTATS_TRUE@MODSTATS = mod.stats +@COND_MODUWORLD_TRUE@MODUWORLD = mod.uworld + @COND_TESTDIR_TRUE@TESTDIR = test @COND_DBDIR_TRUE@DBDIR = db @@ -195,6 +199,7 @@ $(MODNICKSERV) \ $(MODSCANNER) \ $(MODSTATS) \ + $(MODUWORLD) \ $(TESTDIR) \ $(DBDIR) \ libircu @@ -210,6 +215,7 @@ bin/nickserv.example.conf.in \ bin/scanner.example.conf.in \ bin/stats.example.conf.in \ + bin/uworld.example.conf.in \ bin/server_command_map.in \ contrib/00INDEX.TXT \ contrib/chktrans.py \ @@ -258,6 +264,9 @@ doc/update_themes.sql \ doc/update_tzmove_l.sql \ doc/update_tzmove_r.sql \ + doc/uworld.sql \ + doc/uworld.commands.sql \ + doc/uworld.addme.sql \ doc/cmaster/website/faq.html \ doc/cmaster/website/index.html \ doc/cmaster/website/install.html \ @@ -311,7 +320,7 @@ bin/cservice.example.conf bin/gnutest.example.conf \ bin/GNUWorld.example.conf bin/nickserv.example.conf \ bin/scanner.example.conf bin/stats.example.conf \ - bin/dronescan.example.conf + bin/dronescan.example.conf bin/uworld.example.conf DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ @@ -325,7 +334,8 @@ install-sh ltconfig ltmain.sh missing mkinstalldirs DIST_SUBDIRS = libgnuworld libltdl src @NEW_MODS@ mod.ccontrol \ mod.clientExample mod.cloner mod.cservice mod.dronescan \ - mod.gnutest mod.nickserv mod.scanner mod.stats test db libircu + mod.gnutest mod.nickserv mod.scanner mod.stats mod.uworld test \ + db libircu all: all-recursive .SUFFIXES: @@ -384,7 +394,8 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ bin/dronescan.example.conf: $(top_builddir)/config.status $(top_srcdir)/bin/dronescan.example.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ - +bin/uworld.example.conf: $(top_builddir)/config.status $(top_srcdir)/bin/uworld.example.conf + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-24 21:06:44
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 21:03:59 UTC Added files: mod.uworld/ACCESSCommand.cc mod.uworld/ADDUSERCommand.cc mod.uworld/AGLCommand.cc mod.uworld/BADCHANCommand.cc mod.uworld/CHANINFOCommand.cc mod.uworld/CHECKNETCommand.cc mod.uworld/CLEARCHANCommand.cc mod.uworld/COPYING mod.uworld/ChangeLog mod.uworld/DEAUTHCommand.cc mod.uworld/DELSERVERCommand.cc mod.uworld/FDEAUTHCommand.cc mod.uworld/GLINECommand.cc mod.uworld/GLOBALNOTCommand.cc mod.uworld/HELPCommand.cc mod.uworld/INVITECommand.cc mod.uworld/INVMECommand.cc mod.uworld/JOINCommand.cc mod.uworld/LASTCOMMCommand.cc mod.uworld/LEARNNETCommand.cc mod.uworld/LICENSE mod.uworld/LISTCommand.cc mod.uworld/LOGINCommand.cc mod.uworld/MODECommand.cc mod.uworld/MODUSERCommand.cc mod.uworld/Makefile.am mod.uworld/Makefile.in mod.uworld/NEWPASSCommand.cc mod.uworld/OMSGCommand.cc mod.uworld/OPCHANCommand.cc mod.uworld/PARTCommand.cc mod.uworld/QUOTECommand.cc mod.uworld/REMBADCHANCommand.cc mod.uworld/REMGLINECommand.cc mod.uworld/REMUSERCommand.cc mod.uworld/SAYCommand.cc mod.uworld/SCANCommand.cc mod.uworld/SERVLISTCommand.cc mod.uworld/SHUTDOWNCommand.cc mod.uworld/STATUSCommand.cc mod.uworld/SUSPENDCommand.cc mod.uworld/TRANSLATECommand.cc mod.uworld/UNSUSPENDCommand.cc mod.uworld/UPTIMECommand.cc mod.uworld/WALLOPSCommand.cc mod.uworld/WHOISCommand.cc mod.uworld/constants.h mod.uworld/glineConstants.h mod.uworld/levels.h mod.uworld/uwAGL.cc mod.uworld/uwAGL.h mod.uworld/uwGline.cc mod.uworld/uwGline.h mod.uworld/uwLog.cc mod.uworld/uwLog.h mod.uworld/uwServer.cc mod.uworld/uwServer.h mod.uworld/uwUser.cc mod.uworld/uwUser.h mod.uworld/uworld.cc mod.uworld/uworld.h mod.uworld/uworldCommands.cc mod.uworld/uworldCommands.h Log message: Initial Import of mod.uworld ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.uworld/ACCESSCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/ACCESSCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/ACCESSCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,67 @@ +/* + * ACCESSCommand.cc + * + * Shows all the users that has access to the bot + */ + +#include <string> +#include <sstream> +#include <cstdlib> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "constants.h" + +const char ACCESSCommand_cc_rcsId[] = "$Id: ACCESSCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool ACCESSCommand::Exec( iClient* theClient, const string& Message) +{ + +StringTokenizer st( Message ) ; + + +bool PrivMsg = bot->SendPrivmsg(theClient); + +string Uname; +if(st.size() > 1) + { + if(st[1].size() > 64) + { + bot->SendTo(theClient, PrivMsg,"User name can't be more than 64 chars"); + return false; + } + Uname = string_lower(st[1]); + } +else + { + Uname = ""; + } + +bot->listUsers(theClient, PrivMsg, Uname); + + +string username = "notLoggedIn"; +uwUser* theUser = bot->IsAuth(theClient); +if(theUser) username = theUser->getUserName(); +bot->addLog(username, theClient, "ACCESS %s", st.assemble(1).c_str()); + +// no msgchanlog here! + +return true; +} + +} + +} // namespace gnuworld Index: gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/ADDUSERCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,106 @@ +/* + * ADDUSERCommand.cc + * + * Author: Matthias Crauwels <ult...@wo...> + * Date: 29-06-2002 + * + */ + +#include <string> +#include <iomanip> +#include <sstream> + +#include <cstdlib> + +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" +#include "uworld.h" + +const char ADDUSERCommand_cc_rcsId[] = "$Id: ADDUSERCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool ADDUSERCommand::Exec( iClient* theClient, const string& Message ) +{ + +// adduser <nick> <level> <pass> +StringTokenizer st( Message ) ; + +bool PrivMsg = bot->SendPrivmsg(theClient); + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::adduser) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::adduser); + return false; + } + +if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + +if(st[1].size() > 64) + { + bot->SendTo(theClient, PrivMsg, "User name can't be more than 64 chars"); + return false; + } + +uwUser* tmpUser = bot->GetUser(bot->removeSqlChars(st[1])); +if( tmpUser ) + { + bot->SendTo(theClient, PrivMsg, "This user allready exists!!"); + return false; + } + +int level = atoi(st[2].c_str()); +if( level >= bot->getOperLevel(theClient)) + { + bot->SendTo(theClient, PrivMsg, "You can NOT add users with access higher or equal to your own!"); + return false; + } + +if( (level < 0) || (level > 1000) ) + { + bot->SendTo(theClient, PrivMsg, "An access level has to been between 0 and 1000"); + return false; + } + +string pass = bot->CryptPass(st[3]).c_str(); + + +uwUser* newUser = new (std::nothrow) uwUser(bot->SQLDb); +assert( newUser != 0 ) ; + +newUser->setUserName(bot->removeSqlChars(st[1])); +newUser->setAccess(level); +newUser->setPassword(pass); +newUser->Insert(); +bot->addUser(newUser); + +bot->SendTo(theClient, PrivMsg, "Added %s with level %d", bot->removeSqlChars(st[1]).c_str(), level); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "ADDUSER %s %s", st[1].c_str(), st[2].c_str()); +bot->MsgChanLog("%s ( %s ) added user %s with access %d", theClient->getNickName().c_str(), + theClient->getNickUserHost().c_str(), newUser->getUserName().c_str(), newUser->getAccess()); + + +return true; +} + +} // uwrld + +} // gnuworld Index: gnuworld-sithnet/mod.uworld/AGLCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/AGLCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/AGLCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,169 @@ +/* + * AGLCommand.cc + * + * AUTO-GLINE handler + * + * $Id: AGLCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + */ + +#include <string> +#include <cstdlib> +#include <iomanip> + +#include "uworld.h" +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ + +using std::string ; + +namespace uwrld +{ + +bool AGLCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); +short int operLevel = bot->getOperLevel(theClient); + +if( st.size() < 2 ) + { + // send help + Usage( theClient ) ; + return false ; + } + +string command = string_upper(st[1]); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "AGL %s", st.assemble(1).c_str()); +bot->MsgChanLog("%s ( %s ) - AGL %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +if(command == "LIST") + { + if(operLevel < levels::agl::list) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::list); + return false; + } + bot->listAGL(theClient, PrivMsg); + return true; + } + +if(command == "ADD") + { + if(operLevel < levels::agl::add) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::add); + return false; + } + + uwAGL* theAGL = bot->findAGL(st[2]); + if(theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry allready exists! Use AGL UPDATE <host>"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + string hostname; + + iClient* targetClient = Network->findNick(st[2]); + if(targetClient) + hostname = targetClient->getRealInsecureHost(); + else + { + string::size_type atPos = st[ 2 ].find_first_of( '@' ) ; + if( string::npos == atPos ) + hostname = st[2]; + else + hostname = st[2].substr( atPos + 1 ); + } + + theAGL = new (std::nothrow) uwAGL(bot->SQLDb); + assert( theAGL != 0 ) ; + + theAGL->setAGLHost(hostname); + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Insert(); + + bot->addAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I added a new AGL-entry for %s allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } + +if(command == "UPDATE") + { + if(operLevel < levels::agl::update) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + + if(atoi(st[3].c_str()) < 1) + { + bot->SendTo(theClient, PrivMsg, "The minimum connections you have allow is 1"); + return false; + } + + theAGL->setNumberConn(atoi(st[3].c_str())); + theAGL->setAddedBy(theUser->getUserName()); + theAGL->setAddedOn(::time(0)); + theAGL->Update(); + bot->updateAGL(theAGL); + + bot->SendTo(theClient, PrivMsg, "I updated the AGL-entry for %s now allowing %d connections", + theAGL->getAGLHost().c_str(), theAGL->getNumberConn()); + return true; + } +if(command == "DEL") + { + if(operLevel < levels::agl::del) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::agl::del); + return false; + } + uwAGL* theAGL = bot->findAGL(st[2]); + if(!theAGL) + { + bot->SendTo(theClient, PrivMsg, "This entry does NOT exist!"); + return false; + } + theAGL->Delete(); + bot->remAGL(theAGL); + bot->SendTo(theClient, PrivMsg, "I deleted the AGL-entry for %s", theAGL->getAGLHost().c_str()); + delete theAGL; + return true; + } + + + +Usage( theClient ); +return true; +} + +} +} + Index: gnuworld-sithnet/mod.uworld/BADCHANCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/BADCHANCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/BADCHANCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,133 @@ +/* + * BADCHANCommand.cc + * $Id: BADCHANCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" +#include "uwGline.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool BADCHANCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::gline::channel) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); + return false; + } + +int gLength = 0; +string reason = "No reason added for some reason"; +int requiredLevel = levels::gline::channel; + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "You need to badchan an existing channel!"); + return false; + } + +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + requiredLevel = levels::gline::permchannel; + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( requiredLevel < levels::gline::longterm ) + requiredLevel = levels::gline::longterm; + } + +if(operLevel < requiredLevel) + { + bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); + return false; + } + +uwGline* newGline = bot->findGline(theChan->getName()); +if(!newGline) +{ + newGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (newGline != NULL); + + newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + newGline->setAddedOn(::time(0)); + newGline->setHost(theChan->getName()); + newGline->setAddedLevel(requiredLevel); + newGline->setReason(reason); + if(gLength != 0) + newGline->setExpires(::time(0) + gLength ); + else + newGline->setExpires(0); + newGline->Insert(); + + //need to load the id + newGline->loadData(newGline->getHost()); + bot->addGline(newGline); + bot->SendTo(theClient, PrivMsg, "Badchan for %s added.", newGline->getHost().c_str()); + uwUser* theUser = bot->IsAuth(theClient); + if(!theUser) return false; + bot->addLog(theUser, theClient, "BADCHAN %s", st.assemble(1).c_str()); + + bot->MsgChanLog("%s ( %s ) badchanned %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), + newGline->getHost().c_str(), (newGline->getExpires() == 0) ? "PERMANENT" : bot->convertToAscTime(newGline->getExpires()) ); + + server->setGline(server->getName(), newGline->getHost(), reason, (gLength == 0) ? (3600*24*500) : gLength); + +} +return true; +} //badchancmd + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/CHANINFOCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,72 @@ +/* + * CHANINFOCommand.cc + * + * Shows information about a channel + * + * $Id: CHANINFOCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + * + */ +#include <string> +//#include <cstdlib> +//#include <iomanip> + +#include "Network.h" +#include "uworld.h" +#include "StringTokenizer.h" +#include "levels.h" + + +namespace gnuworld +{ + +using std::string ; + +namespace uwrld +{ + +bool CHANINFOCommand::Exec( iClient* theClient, const string& Message ) +{ +StringTokenizer st( Message ); +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::chaninfo) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::opchan); + return false; + } + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "Unable to find channel %s", st[1].c_str()); + return true; + } + +bot->SendTo(theClient, PrivMsg, "Channel %s is mode %s", st[1].c_str(), theChan->getModeString().c_str()); +bot->SendTo(theClient, PrivMsg, "Created at time: %s", bot->convertToAscTime(theChan->getCreationTime())); +bot->SendTo(theClient, PrivMsg, "Number of channel users: %d", theChan->size()); + +#ifdef TOPIC_TRACK + bot->SendTo(theClient, PrivMsg, "Topic: %s", theChan->getTopic().c_str()); +#endif + +string username = "notLoggedIn"; +uwUser* theUser = bot->IsAuth(theClient); +if(theUser) username = theUser->getUserName(); +bot->addLog(username, theClient, "CHANINFO %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - CHANINFO %s", username.c_str(), + theClient->getNickUserHost().c_str(), st[1].c_str()); + + +return true ; +} + +} +} // namespace gnuworld Index: gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/CHECKNETCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,51 @@ +/* + * CHECKNETCommand.cc + * $Id: CHECKNETCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool CHECKNETCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::checknet) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::checknet); + return false; + } + +bot->SendTo(theClient, PrivMsg, "Listing missing servers..."); +bot->listMissingServers(theClient, PrivMsg); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "CHECKNET"); +bot->MsgChanLog("%s ( %s ) - CHECKNET", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str() ); + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc:1.1 --- /dev/null Fri Oct 24 14:03:59 2003 +++ gnuworld-sithnet/mod.uworld/CLEARCHANCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,238 @@ +/* + * CLEARCHANCommand.cc + * + * Clears all/some channel modes + * + */ + +#include <string> +#include <cstdlib> +#include <iomanip> +#include "Network.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "StringTokenizer.h" +#include "levels.h" + +const char CLEARCHANCommand_cc_rcsId[] = "$Id: CLEARCHANCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::vector ; +using gnuworld::iClient; + +namespace uwrld +{ + +bool CLEARCHANCommand::Exec( iClient* theClient, const string& Message ) +{ +StringTokenizer st( Message ) ; +bool Desynch = false; +bool PrivMsg = bot->SendPrivmsg(theClient); + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::clearchan) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::clearchan); + return false; + } + +if( st.size() < 2 ) + { + Usage( theClient ) ; + return true ; + } + + +Channel* theChan = Network->findChannel( st[ 1 ] ) ; +if( NULL == theChan ) + { + bot->Notice( theClient, "Unable to find channel %s", + st[ 1 ].c_str() ) ; + return true ; + } + +string doModes; //This holds the modes the user asked to be removed +string remModes = ""; //Holds the modes that we are removing +string args = ""; //Holds the arguments for the remModes + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "CLEARCHAN %s", theChan->getName().c_str()); +bot->MsgChanLog("%s ( %s ) - CLEARCHAN %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +//Check if the user specified the modes, if not assume he ment all of the modes +if(st.size() == 2) + doModes = "OBKLIM"; +else if(!strcasecmp(string_upper(st[ 2 ]).c_str(),"ALL")) + doModes = "OBKLINMSPT"; +else if(!strcasecmp(string_upper(st [ 2]).c_str(),"-D")) + Desynch = true; +else + doModes = string_upper(st [ 2 ]); + +if(Desynch) + { + vector<iClient*> KickVec; + bot->Join(theChan->getName(),"+i",0,true); + //bot->Mode(theChan,Channel::MODE_I); + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + KickVec.push_back(ptr->second->getClient()); + } + else + { + /* + its a +k user, need to make sure its not us + */ + if(strcmp(ptr->second->getClient()->getCharYYXXX().c_str(), + bot->getCharYYXXX().c_str())) + { + bot->Message(ptr->second->getClient(),"OPERPART %s" + ,theChan->getName().c_str()); + } + } + } + if(KickVec.size() > 0) + { + string reason = "Desynch clearing"; + bot->Kick(theChan,KickVec,reason); + } + bot->Part(theChan->getName()); + return true; + } + +for( string::size_type modePos = 0 ; modePos < doModes.size() ; ++modePos ) + { + switch( doModes[ modePos ] ) + { + case 'B': //Ban? + { + string ban; + string modes = "-"; + string args = ""; + Channel::banListSizeType end = theChan->banList_size(); + Channel::banIterator ptr = theChan->banList_begin() ; + for(Channel::banListSizeType i=0; i != end ;i++) + { + ban = *ptr; + ptr++; + args += ban + ' '; + modes+= "b"; + theChan->removeBan(ban); + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + break; + } + case 'O': //Chanops? + { + string modes = "-"; + string args = ""; + for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_O)) + { + /* Don't deop +k things */ + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + modes+= 'o'; + args+= ptr->second->getCharYYXXX() + " "; + ptr->second->removeMode(ChannelUser::MODE_O); + } + } // If opped. + if(modes.size() > 5) //if we got more than 5 , set the mode and continue + { + bot->ModeAsServer( theChan, modes + ' ' + args ) ; + modes = "-"; + args = ""; + } + } + if(!args.empty()) + bot->ModeAsServer(theChan,modes + " " + args); + } + break; + case 'K': //Key? + if(theChan->getMode(Channel::MODE_K)) + { + theChan->removeMode(Channel::MODE_K); + remModes+= "k"; + args+= theChan->getKey() + " "; + theChan->setKey(""); + } + break; + case 'I': //Invite? + if(theChan->getMode(Channel::MODE_I)) + { + theChan->removeMode(Channel::MODE_I); + remModes+= "i"; + } + break; + case 'L': //Limit? + if(theChan->getMode(Channel::MODE_L)) + { + theChan->removeMode(Channel::MODE_L); + remModes+= "l"; + //args+= theChan->getLimit() + " "; + } + break; + case 'P': //Private? + if(theChan->getMode(Channel::MODE_P)) + { + theChan->removeMode(Channel::MODE_P); + remModes+= "p"; + } + break; + case 'S': //Secret? + if(theChan->getMode(Channel::MODE_S)) + { + theChan->removeMode(Channel::MODE_S); + remModes+= "s"; + } + break; + case 'M': //Moderated? + if(theChan->getMode(Channel::MODE_M)) + { + theChan->removeMode(Channel::MODE_M); + remModes+= "m"; + } + break; + case 'N': //No External Messages? + if(theChan->getMode(Channel::MODE_N)) + { + theChan->removeMode(Channel::MODE_N); + remModes+= "n"; + } + break; + case 'T': //Topic? + if(theChan->getMode(Channel::MODE_T)) + { + theChan->removeMode(Channel::MODE_T); + remModes+= "t"; + } + break; + default:; + } } +if(!remModes.empty()) + bot->ModeAsServer(theChan,"-" + remModes + " " + args); + + +return true; +} + +} +} Index: gnuworld-sithnet/mod.uworld/COPYING diff -u /dev/null gnuworld-sithnet/mod.uworld/COPYING:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/COPYING Fri Oct 24 14:03:49 2003 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Index: gnuworld-sithnet/mod.uworld/ChangeLog diff -u /dev/null gnuworld-sithnet/mod.uworld/ChangeLog:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/ChangeLog Fri Oct 24 14:03:49 2003 @@ -0,0 +1,17 @@ +2002-06-29 Jochen Meesters <Den...@pa...> + + * Added logging of commands to consolechan + * Levelcheck on commands added by ULtimaTe_ (the one who is to lazy to use this ChangeLog + * QUOTECommand and SAYCommand added + * Same goes for JOINCommand and PARTCommand + * And HELPCommand + +2002-06-28 Jochen Meesters <Den...@pa...> + + * ChangeLog: Erm, added one :-) + * WHOISCommand.cc: Guess what? Yeah, added. + * SCANCommand.cc: Hmmz, added (duh). + * TRANSLATECommand.cc: Sigh, why even ask? + * SERVLISTCommand.cc: bleh. + * CLEARCHANCommand.cc: bleh² + * INVITECommand.cc: ' ' (left blank on purpose) Index: gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/DEAUTHCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,47 @@ +/* + * DEAUTHCommand.cc + */ + +//#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool DEAUTHCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 1 ) + { + Usage(theClient); + return true; + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) + { + bot->SendTo(theClient, PrivMsg, "You have to be logged in before you can DEAUTH"); + return false; + } + +bot->addLog(theUser, theClient, "DEAUTH"); +bot->MsgChanLog("%s ( %s ) - DEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +bot->deAuthUser(theClient->getCharYYXXX()); +bot->SendTo(theClient, PrivMsg, "You have successfully been deauthed! Cya!"); +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/DELSERVERCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,68 @@ +/* + * DELSERVERCommand.cc + * $Id: DELSERVERCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool DELSERVERCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::delserver) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::delserver); + return false; + } + +uwServer* remServer = bot->findServer(st[1]); +if(!remServer) + { + bot->SendTo(theClient, PrivMsg, "No such server"); + return false; + } + +iServer* netServer = Network->findServerName(st[1]); +if(netServer) + { + bot->SendTo(theClient, PrivMsg, "Would you delink this server first please!"); + return false; + } + +bot->remServer(remServer); +bot->SendTo(theClient, PrivMsg, "Removed %s from my memory!", st[1].c_str()); + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "DELSERVER %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - DELSERVER %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st[1].c_str()); + + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/FDEAUTHCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,70 @@ +/* + * FDEAUTHCommand.cc + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool FDEAUTHCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::fdeauth) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::fdeauth); + return false; + } + +iClient* targetClient = Network->findNick(st[1]); +if(!targetClient) + { + bot->SendTo(theClient, PrivMsg, "Can't find nick %s", st[1].c_str()); + return false; + } + +short int targetLevel = bot->getOperLevel(targetClient); +if(operLevel < targetLevel) + { + bot->SendTo(theClient, PrivMsg, "You can not deauthenticate users with access higher than your own!"); + return false; + } + +const uwUser* authUser = bot->IsAuth(targetClient); +if(!authUser) + { + bot->SendTo(theClient, PrivMsg, "User %s is not authed", st[1].c_str()); + return false; + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "FDEAUTH %s", st[1].c_str()); +bot->MsgChanLog("%s ( %s ) - FDEAUTH %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + +bot->deAuthUser(targetClient->getCharYYXXX()); +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/GLINECommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/GLINECommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/GLINECommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,304 @@ +/* + * GLINECommand.cc + * $Id: GLINECommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $ + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "Network.h" +#include "uwGline.h" + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool GLINECommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 3 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::gline::standard) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::standard); + return false; + } + +StringTokenizer::size_type pos = 1 ; +string username; +string hostname; +int gLength = 3600; +string reason = "No reason added for some reason"; +bool nickname = false; +bool channel = false; + +if(st[1][0] == '#') + channel = true; + +if(!channel) +{ + +string::size_type atPos = st[ pos ].find_first_of( '@' ) ; +if( string::npos == atPos ) + { + // specified nickname + iClient* targetClient = Network->findNick(st[1]); + if (targetClient) + { + nickname = true; + hostname = targetClient->getRealInsecureHost(); + username = targetClient->getUserName(); + } + } +else + { + username = st[ pos ].substr( 0, atPos ) ; + hostname = st[ pos ].substr( atPos + 1 ) ; + } + +int requiredLevel = levels::gline::standard; + +if(!nickname) +{ + int parseRes = bot->parseHost(hostname); + switch (parseRes) + { + case 0: // standard + requiredLevel = levels::gline::standard; + break; + case 1: // ablock + requiredLevel = levels::gline::ablock; + break; + case 2: // bblock + requiredLevel = levels::gline::bblock; + break; + case 3: // cblock + requiredLevel = levels::gline::cblock; + break; + case 4: // tld + requiredLevel = levels::gline::tld; + break; + case 5: // isp + requiredLevel = levels::gline::isp; + break; + + + case 20: // err_illegalhost + bot->SendTo(theClient, PrivMsg, "I don't think that would be a valid hostname!"); + return false; + + } //switch +} // if(!nickname) + +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( requiredLevel < levels::gline::longterm ) + requiredLevel = levels::gline::longterm; + } + +if(operLevel < requiredLevel) + { + bot->SendTo(theClient, PrivMsg, "This gline requires access level %d!", requiredLevel); + return false; + } + +int matches = Network->countMatchingUserHost(username + "@" + hostname); +char theReason[255]; +sprintf(theReason, "[%d] %s", matches, reason.c_str()); + +/* debugging stuff +bot->MsgChanLog("DEBUG: username = %s", username.c_str()); +bot->MsgChanLog("DEBUG: hostname = %s (%s IP) and has %d dots", hostname.c_str(), bot->isIP(hostname) ? "IS" : "is GEEN", + bot->CountDots(hostname) ); +bot->MsgChanLog("DEBUG: length = %s%c", length.c_str(), unit); +bot->MsgChanLog("DEBUG: gLength = %d", gLength); +bot->MsgChanLog("DEBUG: reason = %s", reason.c_str()); +bot->MsgChanLog("DEBUG: matches = %d", matches); +*/ + +uwGline* newGline = bot->findGline(username + "@" + hostname); +if(!newGline) +{ + newGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (newGline != NULL); + + newGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + newGline->setAddedOn(::time(0)); + newGline->setHost(username + "@" + hostname); + newGline->setAddedLevel(requiredLevel); + newGline->setReason(theReason); + newGline->setExpires(::time(0) + gLength ); + newGline->Insert(); + + //need to load the id + newGline->loadData(newGline->getHost()); + bot->addGline(newGline); + bot->SendTo(theClient, PrivMsg, "Gline %s added.", newGline->getHost().c_str()); + uwUser* theUser = bot->IsAuth(theClient); + if(!theUser) return false; + bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) added gline %s untill %s", theUser->getUserName().c_str(), theClient->getNickUserHost().c_str(), + newGline->getHost().c_str(), bot->convertToAscTime(newGline->getExpires())); + + server->setGline(server->getName(), newGline->getHost(), theReason, gLength); + +} +return true; +} // if(!channel) + +// wel een channel-gline +if(operLevel < levels::gline::channel) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::channel); + return false; + } + +Channel* theChan = Network->findChannel(st[1]); +if(!theChan) + { + bot->SendTo(theClient, PrivMsg, "Can NOT gchan a non-existing channel"); + return false; + } + +bool longterm = false; +string length; +length.assign(st[2]); +int len = strlen(st[2].c_str()); +const char unit = st[2][len-1]; + +if(!isdigit(unit)) + length = length.substr( 0, length.length() - 1 ); + +if(!IsNumeric(length)) + { + reason = st.assemble(2); + } +else + { + if( st.size() < 4 ) + { + Usage(theClient); + return true; + } + + reason = st.assemble(3); + if(unit == 'd') + gLength = (atoi(length.c_str()) * 3600 * 24); + else if(unit == 'h') + gLength = (atoi(length.c_str()) * 3600); + else if(unit == 'm') + { + gLength = (atoi(length.c_str()) * 60); + } + else + gLength = (atoi(length.c_str())); + } + +if(gLength > 3600 * 24 * 2) + { + if( operLevel < levels::gline::longterm ) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::gline::longterm); + return false; + } + longterm = true; + } + +uwGline* tmpGline; +iClient* tmpClient; +int affected = 0; +for( Channel::const_userIterator ptr = theChan->userList_begin() ; ptr != theChan->userList_end() ; ++ptr ) + { + tmpClient = ptr->second->getClient(); + if( !tmpClient->isOper() && !tmpClient->getMode(iClient::MODE_SERVICES) && !bot->IsAuth(tmpClient) ) + { + hostname = tmpClient->getRealInsecureHost(); + username = tmpClient->getUserName(); + if(username.substr(0,1) == "~") username = "~*"; + + int matches = Network->countMatchingUserHost(username + "@" + hostname); + char theReason[255]; + sprintf(theReason, "[%d] %s", matches, reason.c_str()); + + tmpGline = bot->findGline(username + "@" + hostname); + if(!tmpGline) + { + tmpGline = new (std::nothrow) uwGline(bot->SQLDb); + assert (tmpGline != NULL); + + tmpGline->setAddedBy(theClient->getRealNickUserHost().c_str()); + tmpGline->setAddedOn(::time(0)); + tmpGline->setHost(username + "@" + hostname); + tmpGline->setAddedLevel(longterm ? (levels::gline::longterm) : (levels::gline::channel)); + tmpGline->setReason(theReason); + tmpGline->setExpires(::time(0) + gLength ); + tmpGline->Insert(); + + //need to load the id + tmpGline->loadData(tmpGline->getHost()); + bot->addGline(tmpGline); + server->setGline(server->getName(), tmpGline->getHost(), theReason, gLength); + affected++; + } + } + } + +bot->SendTo(theClient, PrivMsg, "Gline for channel %s added. (%d users affected)", theChan->getName().c_str(), affected); +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "GLINE %s", st.assemble(1).c_str()); + bot->MsgChanLog("%s ( %s ) added gline for channel %s affecting %d users", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), theChan->getName().c_str(), affected); + +return true; +} //glinecmd + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/GLOBALNOTCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,73 @@ +/* + * GLOBALCommand.cc + * $Id: + * + */ + +#include <string> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "levels.h" +#include "iServer.h" +#include "Network.h" +#include "server.h" + + +namespace gnuworld +{ +using std::string ; + +namespace uwrld +{ + +bool GLOBALCommand::Exec( iClient* theClient, const string& Message ) +{ + +StringTokenizer st( Message ) ; +bool PrivMsg = bot->SendPrivmsg(theClient); + +if( st.size() < 2 ) + { + Usage(theClient); + return true; + } + +unsigned short int operLevel = bot->getOperLevel(theClient); +if(operLevel < levels::global) + { + bot->SendTo(theClient, PrivMsg, "This command requires access level %d!", levels::global); + return false; + } + +xNetwork::serverIterator ptr = Network->server_begin(); +xNetwork::serverIterator end = Network->server_end(); + +for( ; ptr != end ; ptr++ ) + { + iServer* CurServer = ptr->second ; + if( NULL == CurServer) + { + continue ; + } + + if(!server->isJuped(CurServer)) + { + bot->Write("%s%s O $%s : \002%s\002 %s", + bot->getCharYY(), bot->getCharXXX(), + CurServer->getName().c_str(), "-=GLOBAL NOTICE=-", st.assemble(1).c_str()); + } + } + +uwUser* theUser = bot->IsAuth(theClient); +if(!theUser) return false; +bot->addLog(theUser, theClient, "GLOBALNOTICE %s", st.assemble(1).c_str()); +bot->MsgChanLog("%s ( %s ) - GLOBALNOTICE %s", theUser->getUserName().c_str(), + theClient->getNickUserHost().c_str(), st.assemble(1).c_str()); + + +return true; +} + +} // namespace uwrld +} // namespace gnuworld. Index: gnuworld-sithnet/mod.uworld/HELPCommand.cc diff -u /dev/null gnuworld-sithnet/mod.uworld/HELPCommand.cc:1.1 --- /dev/null Fri Oct 24 14:04:00 2003 +++ gnuworld-sithnet/mod.uworld/HELPCommand.cc Fri Oct 24 14:03:49 2003 @@ -0,0 +1,98 @@ +/* + * HELPCommand.cc + */ + +#include <string> +#include <sstream> +#include <cstdlib> + +#include "StringTokenizer.h" +#include "uworld.h" +#include "uworldCommands.h" +#include "constants.h" + +const char HELPCommand_cc_rcsId[] = "$Id: HELPCommand.cc,v 1.1 2003/10/24 21:03:49 darthsidious_ Exp $"; + +namespace gnuworld +{ + +using std::string ; +using std::endl ; +using std::stringstream ; +using std::ends ; + +namespace uwrld +{ + +bool HELPCommand::Exec( iCli... [truncated message content] |
From: Tim I. <dar...@us...> - 2003-10-25 01:38:33
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-25 01:36:04 UTC Modified files: mod.cservice/levels.h Log message: changed command levels ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/levels.h diff -u gnuworld-sithnet/mod.cservice/levels.h:1.2 gnuworld-sithnet/mod.cservice/levels.h:1.3 --- gnuworld-sithnet/mod.cservice/levels.h:1.2 Fri Oct 24 10:31:45 2003 +++ gnuworld-sithnet/mod.cservice/levels.h Fri Oct 24 18:35:54 2003 @@ -21,11 +21,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: levels.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $ + * $Id: levels.h,v 1.3 2003/10/25 01:35:54 darthsidious_ Exp $ */ #ifndef __LEVELS_H -#define __LEVELS_H "$Id: levels.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $" +#define __LEVELS_H "$Id: levels.h,v 1.3 2003/10/25 01:35:54 darthsidious_ Exp $" namespace gnuworld { @@ -53,7 +53,7 @@ const int deop = 100; const int op = 100; - const int invite = 100; + const int invite = 24; const int suspend = 100; const int unsuspend = 100; @@ -77,12 +77,11 @@ const int registercmd = 750; const int globalsuspend = 750; const int rehash = 900; - const int adduserid = 900; + //const int adduserid = 900; - Temporarily(?) Disabled const int purge = 750; const int removeall = 750; - const int adminkill = 750; - + //const int adminkill = 750; - Temporarily(?) Disabled const int remignore = 600; const int servnotice = 800; @@ -90,7 +89,7 @@ // Debug Commands const int shutdown = 900; - const int kill = 1000; + //const int kill = 1000; - Temporarily(?) Disabled const int quote = 1000; namespace set { @@ -105,9 +104,9 @@ const int desc = 450; const int mode = 450; const int noop = 499; - const int oponly = 500; - const int strictop = 475; - const int strictvoice = 475; + const int oponly = 499; + const int strictop = 499; + const int strictvoice = 499; const int lang = 500; const int floodpro = 499; const int autojoin = 500; @@ -115,7 +114,7 @@ const int nopurge = 501; const int comment = 600; const int locked = 600; - const int special = 750; + const int special = 900; const int noreg = 750; const int neverreg = 750; const int noforce = 1000; ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-25 01:46:13
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-25 01:40:58 UTC Added files: mod.cservice/README.SithNet Log message: Re-added SithNet README ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/README.SithNet diff -u /dev/null gnuworld-sithnet/mod.cservice/README.SithNet:1.1 --- /dev/null Fri Oct 24 18:40:58 2003 +++ gnuworld-sithnet/mod.cservice/README.SithNet Fri Oct 24 18:40:48 2003 @@ -0,0 +1,10 @@ +Make dependancies for several added commands have been removed due to +compile-time errors. +these commands as you can probabily guess are ADDUSERID ( parse/syntax +errors) + +KILL and ADMINKILL ( unnecessary, incomplete, and i dont think they +would work at the current stage anyway.. these or a similar command may +be added later). + +this module should now compile. if it doesnt please let us know. ----------------------- End of diff ----------------------- |
From: Tim I. <dar...@us...> - 2003-10-25 07:32:33
|
Committer : Tim Ireland <dar...@us...> CVSROOT : /cvsroot/sithnet-dev Module : gnuworld-sithnet Commit time: 2003-10-24 17:31:56 UTC Modified files: mod.cservice/cservice.h mod.cservice/levels.h mod.cservice/cservice.cc mod.cservice/sqlChannel.cc mod.cservice/sqlChannel.h Log message: Started work on a 'STRICTVOICE' option. this is incomplete and not tested. also made several misc updates ---------------------- diff included ---------------------- Index: gnuworld-sithnet/mod.cservice/cservice.cc diff -u gnuworld-sithnet/mod.cservice/cservice.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/cservice.cc:1.2 --- gnuworld-sithnet/mod.cservice/cservice.cc:1.1.1.1 Sun Oct 19 10:45:53 2003 +++ gnuworld-sithnet/mod.cservice/cservice.cc Fri Oct 24 10:31:45 2003 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.cc,v 1.1.1.1 2003/10/19 17:45:53 darthsidious_ Exp $ + * $Id: cservice.cc,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $ */ #include <new> @@ -2427,6 +2427,27 @@ deopList.push_back(tmpUser->getClient()); sourceHasBeenBad = true; } + // If the channel is STRICTVOICE, devoice everyone who isn't + // authenticated or and doesn't have access on the + // channel. + + if (reggedChan->getFlag(sqlChannel::F_STRICTVOICE)) + { + if (!authUser) + { + // Not authed, devoice. + if ( !tmpUser->getClient()->getMode(iClient::MODE_SERVICES) ) + devoiceList.push_back(tmpUser->getClient()); + sourceHasBeenBad = true; + // Authed but doesn't have access... devoice. + } + else if (!getEffectiveAccessLevel(authUser,reggedChan, false) >= level::voice)) + { + if ( !tmpUser->getClient()->getMode(iClient::MODE_SERVICES) ) + devoiceList.puch_back(tmpUser->getClient()); + sourceHasBeenBad = true; + } + } // If the channel is STRICTOP, deop everyone who isn't // authenticated or and doesn't have access on the @@ -2498,7 +2519,7 @@ } // for() /* - * Send notices and perform the deop's. (But don't deop anything thats +k). + * Send notices and perform the deop's(/devoices). (But don't deop anything thats +k). */ if (theChanUser && sourceHasBeenBad && !theChanUser->getClient()->getMode(iClient::MODE_SERVICES)) @@ -2522,7 +2543,13 @@ DeOp(theChan, deopList); } - +if( !devoiceList.empty() ) + { + if ((theChanUser) && (reggedChan->getFlag(sqlChannel::F_STRICTVOICE)) ) + { + Notice( theChanUser->getClient(), + "The STRICTVOICE flag is set on %s", + reggedChan->getName().c_str()); /* * Have more than 'maxdeoppro' been deopped? * If so, suspend and kick 'em. (Unless they're +k of course ;) @@ -2777,6 +2804,147 @@ if( !deopList.empty() ) { DeOp(theChan, deopList); + } + +} +/** + * Support function to devoice all voiced users on a channel. + */ +void cservice::devoiceAllOnChan(Channel* theChan) +{ +if( !theChan ) + { + /* Don't try this on a null channel. */ + return; + } + +sqlChannel* reggedChan = getChannelRecord(theChan->getName()); + +if (!reggedChan) + { + return; + } + +if (!reggedChan->getInChan()) + { + return; + } + +/* Check we're actually opped first.. */ + +ChannelUser* tmpBotUser = theChan->findUser(getInstance()); +if( !tmpBotUser || !tmpBotUser->getMode(ChannelUser::MODE_V) ) + { + return; + } + +vector< iClient* > deopList; + +for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_V)) + { + + /* Don't devoice +k things */ + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + deopList.push_back( ptr->second->getClient() ); + + } // If opped. + } + +if( !devoiceList.empty() ) + { + DeVoice(theChan, devoiceList); + } + +} + +size_t cservice::countChanVoices(const Channel* theChan) +{ +if( !theChan ) + { + /* Don't try this on a null channel. */ + return 0; + } + +size_t chanVoices = 0; + +for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_V)) + { + chanVoices++; + } // If voiced. + } + +return chanVoices; +} + +/** + * Support function to devoice all non authed opped users on a channel. + */ +void cservice::devoiceAllUnAuthedOnChan(Channel* theChan) +{ +// TODO: assert( theChan != 0 ) ; + +if( !theChan ) + { + /* Don't try this on a null channel. */ + return; + } + +sqlChannel* reggedChan = getChannelRecord(theChan->getName()); + +if( !reggedChan || !reggedChan->getInChan() ) + { + return; + } + +/* Check we're actually opped first.. */ + +ChannelUser* tmpBotUser = theChan->findUser(getInstance()); +if(! tmpBotUser || !tmpBotUser->getMode(ChannelUser::MODE_V)) + { + return; + } + +vector< iClient* > devoiceList; + +for( Channel::const_userIterator ptr = theChan->userList_begin(); + ptr != theChan->userList_end() ; ++ptr ) + { + if( ptr->second->getMode(ChannelUser::MODE_V)) + { + /* Are they authed? */ + sqlUser* authUser = isAuthed(ptr->second->getClient(), false); + + if (!authUser) + { + /* Not authed, deop this guy + Don't deop +k things */ + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + deopList.push_back( ptr->second->getClient() ); + } + + /* Authed but no access? Tough. :) */ + } + else if ((reggedChan) && !(getEffectiveAccessLevel(authUser, reggedChan, false) >= level::voice)) + { + /* Don't deop +k things */ + if ( !ptr->second->getClient()->getMode(iClient::MODE_SERVICES) ) + { + devoiceList.push_back( ptr->second->getClient() ); + } + } + + } // if voiced. + } // forall users in channel. + +if( !devoiceList.empty() ) + { + DeVoice(theChan, devoiceList); } } Index: gnuworld-sithnet/mod.cservice/cservice.h diff -u gnuworld-sithnet/mod.cservice/cservice.h:1.1.1.1 gnuworld-sithnet/mod.cservice/cservice.h:1.2 --- gnuworld-sithnet/mod.cservice/cservice.h:1.1.1.1 Sun Oct 19 10:45:53 2003 +++ gnuworld-sithnet/mod.cservice/cservice.h Fri Oct 24 10:31:45 2003 @@ -17,11 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: cservice.h,v 1.1.1.1 2003/10/19 17:45:53 darthsidious_ Exp $ + * $Id: cservice.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $ */ #ifndef __CSERVICE_H -#define __CSERVICE_H "$Id: cservice.h,v 1.1.1.1 2003/10/19 17:45:53 darthsidious_ Exp $" +#define __CSERVICE_H "$Id: cservice.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $" #include <string> #include <vector> @@ -357,6 +357,10 @@ // Deop everyone on this channel. void deopAllOnChan(Channel*); void deopAllUnAuthedOnChan(Channel*); + + // Devoice everyone on this channel + void devoiceAllOnChan(Channel*); + void devoiceAllUnAuthedOnChan(Channel*); /* Sets a description (url) topic combo. */ void doAutoTopic(sqlChannel*); Index: gnuworld-sithnet/mod.cservice/levels.h diff -u gnuworld-sithnet/mod.cservice/levels.h:1.1.1.1 gnuworld-sithnet/mod.cservice/levels.h:1.2 --- gnuworld-sithnet/mod.cservice/levels.h:1.1.1.1 Sun Oct 19 10:45:55 2003 +++ gnuworld-sithnet/mod.cservice/levels.h Fri Oct 24 10:31:45 2003 @@ -21,11 +21,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: levels.h,v 1.1.1.1 2003/10/19 17:45:55 darthsidious_ Exp $ + * $Id: levels.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $ */ #ifndef __LEVELS_H -#define __LEVELS_H "$Id: levels.h,v 1.1.1.1 2003/10/19 17:45:55 darthsidious_ Exp $" +#define __LEVELS_H "$Id: levels.h,v 1.2 2003/10/24 17:31:45 darthsidious_ Exp $" namespace gnuworld { @@ -98,17 +98,18 @@ const int userflag = 450; const int autotopic = 450; const int url = 450; - const int massdeoppro = 500; + const int massdeoppro = 499; const int keywords = 450; const int floatlim = 450; const int desc = 450; const int mode = 450; - const int noop = 500; + const int noop = 499; const int oponly = 500; - const int strictop = 500; + const int strictop = 475; + const int strictvoice = 475; const int lang = 500; - const int floodpro = 500; + const int floodpro = 499; const int autojoin = 500; const int nopurge = 501; Index: gnuworld-sithnet/mod.cservice/sqlChannel.cc diff -u gnuworld-sithnet/mod.cservice/sqlChannel.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/sqlChannel.cc:1.2 --- gnuworld-sithnet/mod.cservice/sqlChannel.cc:1.1.1.1 Sun Oct 19 10:46:11 2003 +++ gnuworld-sithnet/mod.cservice/sqlChannel.cc Fri Oct 24 10:31:46 2003 @@ -24,7 +24,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: sqlChannel.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $ + * $Id: sqlChannel.cc,v 1.2 2003/10/24 17:31:46 darthsidious_ Exp $ */ #include <sstream> @@ -41,7 +41,7 @@ #include "cservice_config.h" const char sqlChannel_h_rcsId[] = __SQLCHANNEL_H ; -const char sqlChannel_cc_rcsId[] = "$Id: sqlChannel.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $" ; +const char sqlChannel_cc_rcsId[] = "$Id: sqlChannel.cc,v 1.2 2003/10/24 17:31:46 darthsidious_ Exp $" ; namespace gnuworld { @@ -69,6 +69,7 @@ const sqlChannel::flagType sqlChannel::F_OPONLY = 0x00100000 ; // Deprecated const sqlChannel::flagType sqlChannel::F_AUTOJOIN = 0x00200000 ; const sqlChannel::flagType sqlChannel::F_NOFORCE = 0x00400000 ; // Reserved for use by Planetarion. +const sqlChannel::flagType sqlChannel::F_STRICTVOICE = 0x00800000; // Reserved for use by SithNet const int sqlChannel::EV_MISC = 1 ; const int sqlChannel::EV_JOIN = 2 ; Index: gnuworld-sithnet/mod.cservice/sqlChannel.h diff -u gnuworld-sithnet/mod.cservice/sqlChannel.h:1.1.1.1 gnuworld-sithnet/mod.cservice/sqlChannel.h:1.2 --- gnuworld-sithnet/mod.cservice/sqlChannel.h:1.1.1.1 Sun Oct 19 10:46:12 2003 +++ gnuworld-sithnet/mod.cservice/sqlChannel.h Fri Oct 24 10:31:46 2003 @@ -17,11 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: sqlChannel.h,v 1.1.1.1 2003/10/19 17:46:12 darthsidious_ Exp $ + * $Id: sqlChannel.h,v 1.2 2003/10/24 17:31:46 darthsidious_ Exp $ */ #ifndef __SQLCHANNEL_H -#define __SQLCHANNEL_H "$Id: sqlChannel.h,v 1.1.1.1 2003/10/19 17:46:12 darthsidious_ Exp $" +#define __SQLCHANNEL_H "$Id: sqlChannel.h,v 1.2 2003/10/24 17:31:46 darthsidious_ Exp $" #include <string> #include <map> @@ -61,6 +61,7 @@ static const flagType F_ALWAYSOP; static const flagType F_STRICTOP; + static const flagType F_STRICTVOICE; static const flagType F_NOOP; static const flagType F_AUTOTOPIC; static const flagType F_OPONLY; // Deprecated. ----------------------- End of diff ----------------------- |