sirvulcan [Sun, 1 Oct 2006 14:59:45 +0000 (14:59 +0000)]
SIMULATE command for doing simulated auto or manual fixes upon a channel. The only part of this code i dont like that much is the insertop/findop etc code.. I needed a way of tracking whos opped in a channel without actually opping. If theres a better/easier/whatever way of doing this (than the current insertop etc code) then let me know
This function could be used for simulation.. run a loop the increments the time.. pass it on to this loop as the current time.. some temp sqlchan vars will need to be set (refer to fixchan). Anyway this function will determine if C should join or notice if enabled
updated gnuworld patch with servermode events plus basic handling of the new event in chanfix. Any channels that are clearmode'ed or had a mode change by a server will be inserted into the temp block list. Next i need to extend it a bit so that it only inserts when it gets a clearmode with an o or a mode change of ops in the channel
tweak the messages and make them both optional. Also uncommented the isservice code in chanfix.cc. gnuworld cvs has a stable copy of this so we can leave it uncommented for testing. I have the isservice / server flag patch here by reed if anyone needs it
RFE #1461370. When enabled, chanfix will join the channel when its being fixed (both auto and manual). Ive also added in a "This channel is being fixed" notice for auto fixes for opless channels when joining is enabled. Chanfix will part after the fix saying the channel is fixed, users will now know when the channel is all fixed
allow opers to view the CANFIX list for a channel. Also added a update script for revisions pre 1552. This will update the notes table to the new schema, either run it via web browser or via command line php. Wasnt sure how else to do this other than in PHP, sorry. No tables are dropped so if anything goes wrong the old table is still there
Heres an initial version of LASTCOM. At the moment it records via onprivatemessage in chanfix.cc. However if you send invalid args to the target function they get recorded too, so next im going to split it off to a seperate function and call it at the end of each command function.
Done RFE #1469566. Adjusted a few things in responses.h, was causing the python scripts to fail.. wierd stuff. Also renamed ALERT (messaging top ops on fixes) to CONTACT to avoid confusion with the ALERT command. I was pondering renaming it to NOTICE but people may get confused again as NOTICE is used for message types. If you think of a better word/trigger for this function then let me know
New features :) REQUESTOP allows the top ops within X percent of the top score in a channel and above a certain score to fix a channel. CANFIX lists who can fix the channel. Users must have X amount of score for a channel to get a list for the channel. Alert added, this allows the messaging of the top 10 ops to alert them that the channel is being fixed (ops who are not in channel), alert is appended to CHANFIX for it to work. If enabled then the same function can be used with REQUESTOP. The final percentages/scores in chanfix.example.conf.in need to be finalized upon still.
Correct response reply. Add stopFixingChan() function to deal with removing a channel completely from the fixing queue. Replace OPLIST's dots/dotscolors with new days option that is based on percentages (as requested by coekie). Optimize and clean-up some code.
coekie's OPLIST dots RFC complete, with added colour. By default a normal oplist is showen, -dots is required for a normal dots bar and -dotscolor is required for the coloured bar. The coloured bar is for displaying how much points a person got on each day. Its split up into 40 point parts. Each 40 points has its own colour. See the OPLIST code below for the colour list. Also fixed a translation, added USERSCORES and updated OPLIST to reflect my changes
Clean-up the previous commit. Rename stopManualFixOnOp to stopChanFixOnOp to match other config options. Optimize checking code in chanfix.cc for these new options.
Use the correct query for LISTBLOCKED (my last commit broke it). Bump version to v1.0.2. Remove unneeded lines. Remove unused config option. Modify some comments. Make sure that fixes are only ended if a real user is doing the op and not a server. Optimize some USERSCORES code.
Fix lots of warnings. Correct problems with keyword replacements. Use bitwise querying in SHOWBLOCKED. Use the correct form of whitespacing. Rename function for case-related purposes. Remove unneeded lines. Use better optimization in INFO. Basically, lots of clean-up to recently committed code.
r33d [Thu, 23 Mar 2006 23:33:47 +0000 (23:33 +0000)]
Split cf into a separate namespace (thanks Compy for helping and nextie for the advice). Add a patch from coekie to correctly cast two integers to floats in the linear interpolation algorithms. Remove an unneeded language reply (language::chan_manual_fix). Remove the unneeded Timer.h (core already has one). Remove unneeded ccontrolServer. NOTE: This will not compile for people without a special core patch. I will try to get it committed into GNUWorld CVS soon. Fix a problem found by coekie that was causing users that due to chanfix being down during a normal rotate time had missed deletion. While this compiles for me, I have not tested it locally yet. Committing so the other testers can try it, too.
r33d [Sun, 19 Mar 2006 03:59:58 +0000 (03:59 +0000)]
Make Boost::Thread optional for networks that are very small (big networks WILL need to use it). Fix problem with RELOAD that was causing it to save the database twice.
r33d [Fri, 17 Mar 2006 01:46:20 +0000 (01:46 +0000)]
Remove unneeded nonoper/needoper checking. Update default userdescription in config to match Undernet's. Correct several comments. Add more checks for proper access for ADDHOST, DELHOST, SUSPEND, and UNSUSPEND. Use proper whitespacing.
r33d [Fri, 10 Mar 2006 20:44:00 +0000 (20:44 +0000)]
Fix bug found by Saralee that was causing opers that were added in the bot but did not have a valid host added from being able to use basic oper level commands.
r33d [Wed, 8 Mar 2006 02:21:20 +0000 (02:21 +0000)]
Drop CHECK_CHANS_TIME to 60 seconds. Drop PROCESS_QUEUE_TIME to 30 seconds. Change the spacing in OPLIST. Change [NOT LOGGED-IN] to [NOT-LOGGED-IN] in OPLIST. Fix incorrect safety check in INFO.
r33d [Tue, 7 Mar 2006 00:26:59 +0000 (00:26 +0000)]
Add new logDebugMessage() function that will always relay info to consoleChan no matter what sendConsoleNotices is set. Add new debugLog and debugLogFile (chanfix-debug.log). Add several patches from coekie including some CSCORE fixes and changes, OPLIST changes to allow display of all ops, and a change to BLOCK to make it abort any current fixes on the channel. Also, OPLIST, OPNICKS, and CHECK have all been moved to oper level. SCORE now takes [account|=nick] as part of its arguments. Optimize some sqlChanOps code in chanfix.cc. Update config.guess and config.sub to latest versions. Bump chanfix version to 1.0.1.
r33d [Sun, 5 Mar 2006 04:48:33 +0000 (04:48 +0000)]
Add chanfix_defs.h to svnignore. Add new ax_prefix_config_h.m4 autoconf macro to prefix headers. Change PROCESS_QUEUE_TIME to 60 seconds. Move all version information to configure.ac. Disable QUOTE by default (through #undef ENABLE_QUOTE). Add useBurstToFix boolean that if made false can be used to make chanfix just use ClearMode() for manual fixes (default to true). Add new feature to WHOIS to show time that oper last used service. Use std::set instead of std::list for clientOpsType. Allow WHOIS =nick. Correct a few comments. Add a CTCP SUBVERSION reply. Add a CTCP GENDER reply.
r33d [Fri, 3 Mar 2006 00:48:21 +0000 (00:48 +0000)]
Fix bug found on Undernet due to use of pointer that had already been destroyed. Add joinChan option to config to allow for multiple channels to join. Add sendConsoleNotices boolean that can turn relaying of logging on/off. Add a patch from coekie to allow OPLIST/SCORE for channels that don't exist. Remove (now) unneeded operChan/supportChan stuff. Allow user managers to delete other people's notes. Set the last_seen on any command to chanfix. Add date and time to CTCP VERSION. Correct some error messages. Remove unneeded string_lower() in ADDUSER. Make SETGROUP force groups to lowercase. Allow user managers to change the NEEDOPER setting.
r33d [Wed, 18 Jan 2006 22:29:41 +0000 (22:29 +0000)]
Set default intervals to more reasonable times. Remove unused MAX_*FIX defines. Send the correct flags with adminLog.open(). Close adminLog on shutdown. Begin work on using the new map to send information.
r33d [Tue, 17 Jan 2006 00:43:25 +0000 (00:43 +0000)]
Add lots of sanity checks, replace ROTATE and UPDATE commands with one DEBUG command (controlled by CHANFIX_DEBUG), add inSQL boolean to sqlChannel so autofix-only channels are not committed to the database, remove all code related to oplevels/MODE_A, remove unused noCaseComparePair, convert sqlChanOps map to a map within a map (channel [account, sqlChanOp]), remove (now unneeded) myOpsCount map, convert countMyOps() to use the new sqlChanOps map, correctly clean-up after ourselves in sqlManager, do not continue processing a channel if it is not in the database, clean-up code, and miscellaneous whitespacing changes.
reedloden [Thu, 5 Jan 2006 00:12:53 +0000 (00:12 +0000)]
Raise MAXNOTECOUNT to 50, change a comment in config, update SCORE language replies to nex's liking, move some definitions around, and remove an unneeded space.