3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-18 09:59:37 +01:00
pbot/doc/PBot.html

1887 lines
122 KiB
HTML
Raw Normal View History

2014-12-31 02:26:26 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
2015-10-05 11:27:40 +02:00
<meta name="keywords" content="Candide,Category IRC" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch_desc.php" title="C (English)" />
<title>Candide - C</title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "/wiki/skins/common/shared.css?97";
@import "/wiki/skins/monobook/main.css?97";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="/wiki/skins/common/commonPrint.css?97" />
2014-12-31 02:26:26 +01:00
<!--[if lt IE 5.5000]><style type="text/css">@import "/wiki/skins/monobook/IE50Fixes.css?97";</style><![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/wiki/skins/monobook/IE55Fixes.css?97";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/wiki/skins/monobook/IE60Fixes.css?97";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/wiki/skins/monobook/IE70Fixes.css?97";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/wiki/skins/common/IEFixes.js?97"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "monobook";
var stylepath = "/wiki/skins";
var wgArticlePath = "/wiki/$1";
var wgScriptPath = "/wiki";
var wgScript = "/wiki";
var wgServer = "http://www.iso-9899.info";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
2015-10-05 11:27:40 +02:00
var wgPageName = "Candide";
var wgTitle = "Candide";
2014-12-31 02:26:26 +01:00
var wgAction = "view";
var wgRestrictionEdit = ["sysop"];
var wgRestrictionMove = ["sysop"];
var wgArticleId = "935";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
2015-10-05 11:27:40 +02:00
var wgCurRevisionId = "9111";
2014-12-31 02:26:26 +01:00
/*]]>*/</script>
2015-10-05 11:27:40 +02:00
<script type="text/javascript" src="/wiki/skins/common/wikibits.js?97"><!-- wikibits js --></script>
<script type="text/javascript" src="/wiki?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>
<style type="text/css">/*<![CDATA[*/
@import "/wiki?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
@import "/wiki?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
@import "/wiki?title=-&action=raw&gen=css&maxage=18000";
/*]]>*/</style>
<!-- Head Scripts -->
<script type="text/javascript" src="/wiki/skins/common/ajax.js?97"></script>
2014-12-31 02:26:26 +01:00
</head>
2015-10-05 11:27:40 +02:00
<body class="mediawiki ns-0 ltr page-Candide">
2014-12-31 02:26:26 +01:00
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
2015-10-05 11:27:40 +02:00
<h1 class="firstHeading">Candide</h1>
2014-12-31 02:26:26 +01:00
<div id="bodyContent">
2015-10-05 11:27:40 +02:00
<h3 id="siteSub">From C</h3>
2014-12-31 02:26:26 +01:00
<div id="contentSub"></div>
2015-10-05 11:27:40 +02:00
<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content -->
2014-12-31 02:26:26 +01:00
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-1"><a href="#Candide"><span class="tocnumber">1</span> <span class="toctext">Candide</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#About_Candide"><span class="tocnumber">1.1</span> <span class="toctext">About Candide</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Source"><span class="tocnumber">1.1.1</span> <span class="toctext">Source</span></a></li>
<li class="toclevel-3"><a href="#Bot_Channel"><span class="tocnumber">1.1.2</span> <span class="toctext">Bot Channel</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Trigger"><span class="tocnumber">1.2</span> <span class="toctext">Trigger</span></a>
<ul>
<li class="toclevel-3"><a href="#Embedded_trigger"><span class="tocnumber">1.2.1</span> <span class="toctext">Embedded trigger</span></a></li>
<li class="toclevel-3"><a href="#Directing_output_to_a_user"><span class="tocnumber">1.2.2</span> <span class="toctext">Directing output to a user</span></a>
<ul>
<li class="toclevel-4"><a href="#tell"><span class="tocnumber">1.2.2.1</span> <span class="toctext">tell</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="#Registry"><span class="tocnumber">2</span> <span class="toctext">Registry</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Overriding_registry_values_per-channel"><span class="tocnumber">2.1</span> <span class="toctext">Overriding registry values per-channel</span></a></li>
<li class="toclevel-2"><a href="#regadd"><span class="tocnumber">2.2</span> <span class="toctext">regadd</span></a></li>
<li class="toclevel-2"><a href="#regrem"><span class="tocnumber">2.3</span> <span class="toctext">regrem</span></a></li>
<li class="toclevel-2"><a href="#regshow"><span class="tocnumber">2.4</span> <span class="toctext">regshow</span></a></li>
<li class="toclevel-2"><a href="#regset"><span class="tocnumber">2.5</span> <span class="toctext">regset</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Registry_metadata_list"><span class="tocnumber">2.5.1</span> <span class="toctext">Registry metadata list</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="#regunset"><span class="tocnumber">2.6</span> <span class="toctext">regunset</span></a></li>
<li class="toclevel-2"><a href="#regchange"><span class="tocnumber">2.7</span> <span class="toctext">regchange</span></a></li>
<li class="toclevel-2"><a href="#regfind"><span class="tocnumber">2.8</span> <span class="toctext">regfind</span></a></li>
<li class="toclevel-2"><a href="#Creating_array_values"><span class="tocnumber">2.9</span> <span class="toctext">Creating array values</span></a></li>
<li class="toclevel-2"><a href="#List_of_recognized_registry_items"><span class="tocnumber">2.10</span> <span class="toctext">List of recognized registry items</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-1"><a href="#Factoids"><span class="tocnumber">3</span> <span class="toctext">Factoids</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#List_of_factoids"><span class="tocnumber">3.1</span> <span class="toctext">List of factoids</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Channel_namespaces"><span class="tocnumber">3.1.1</span> <span class="toctext">Channel namespaces</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Adding_a_factoid"><span class="tocnumber">3.2</span> <span class="toctext">Adding a factoid</span></a>
<ul>
<li class="toclevel-3"><a href="#factadd"><span class="tocnumber">3.2.1</span> <span class="toctext">factadd</span></a></li>
<li class="toclevel-3"><a href="#Special_commands"><span class="tocnumber">3.2.2</span> <span class="toctext">Special commands</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#.2Fsay"><span class="tocnumber">3.2.2.1</span> <span class="toctext">/say</span></a></li>
<li class="toclevel-4"><a href="#.2Fme"><span class="tocnumber">3.2.2.2</span> <span class="toctext">/me</span></a></li>
<li class="toclevel-4"><a href="#.2Fcall"><span class="tocnumber">3.2.2.3</span> <span class="toctext">/call</span></a></li>
<li class="toclevel-4"><a href="#.2Fmsg"><span class="tocnumber">3.2.2.4</span> <span class="toctext">/msg</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Special_variables"><span class="tocnumber">3.2.3</span> <span class="toctext">Special variables</span></a>
<ul>
<li class="toclevel-4"><a href="#.24nick"><span class="tocnumber">3.2.3.1</span> <span class="toctext">$nick</span></a></li>
<li class="toclevel-4"><a href="#.24args"><span class="tocnumber">3.2.3.2</span> <span class="toctext">$args</span></a></li>
<li class="toclevel-4"><a href="#.24arg.5Bn.5D"><span class="tocnumber">3.2.3.3</span> <span class="toctext">$arg[n]</span></a></li>
<li class="toclevel-4"><a href="#.24arg.5Bn:m.5D"><span class="tocnumber">3.2.3.4</span> <span class="toctext">$arg[n:m]</span></a></li>
<li class="toclevel-4"><a href="#.24channel"><span class="tocnumber">3.2.3.5</span> <span class="toctext">$channel</span></a></li>
<li class="toclevel-4"><a href="#.24randomnick"><span class="tocnumber">3.2.3.6</span> <span class="toctext">$randomnick</span></a></li>
</ul>
</li>
<li class="toclevel-3"><a href="#adlib_list_variables"><span class="tocnumber">3.2.4</span> <span class="toctext">adlib list variables</span></a>
<ul>
<li class="toclevel-4"><a href="#modifiers"><span class="tocnumber">3.2.4.1</span> <span class="toctext">modifiers</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#action_with_args"><span class="tocnumber">3.2.5</span> <span class="toctext">action_with_args</span></a></li>
<li class="toclevel-3"><a href="#add_nick"><span class="tocnumber">3.2.6</span> <span class="toctext">add_nick</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="#Deleting_a_factoid"><span class="tocnumber">3.3</span> <span class="toctext">Deleting a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factrem"><span class="tocnumber">3.3.1</span> <span class="toctext">factrem</span></a></li>
<li class="toclevel-3"><a href="#forget"><span class="tocnumber">3.3.2</span> <span class="toctext">forget</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Viewing.2Ftriggering_a_factoid"><span class="tocnumber">3.4</span> <span class="toctext">Viewing/triggering a factoid</span></a></li>
<li class="toclevel-2"><a href="#Viewing.2Ftriggering_another_channel.27s_factoid"><span class="tocnumber">3.5</span> <span class="toctext">Viewing/triggering another channel's factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#fact"><span class="tocnumber">3.5.1</span> <span class="toctext">fact</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Aliasing_a_factoid"><span class="tocnumber">3.6</span> <span class="toctext">Aliasing a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factalias"><span class="tocnumber">3.6.1</span> <span class="toctext">factalias</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Moving.2Frenaming_a_factoid"><span class="tocnumber">3.7</span> <span class="toctext">Moving/renaming a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factmove"><span class="tocnumber">3.7.1</span> <span class="toctext">factmove</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Changing_a_factoid"><span class="tocnumber">3.8</span> <span class="toctext">Changing a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factchange"><span class="tocnumber">3.8.1</span> <span class="toctext">factchange</span></a></li>
<li class="toclevel-3"><a href="#factset"><span class="tocnumber">3.8.2</span> <span class="toctext">factset</span></a>
<ul>
<li class="toclevel-4"><a href="#Factoid_Metadata_List"><span class="tocnumber">3.8.2.1</span> <span class="toctext">Factoid Metadata List</span></a></li>
</ul>
</li>
<li class="toclevel-3"><a href="#factunset"><span class="tocnumber">3.8.3</span> <span class="toctext">factunset</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Finding_a_factoid"><span class="tocnumber">3.9</span> <span class="toctext">Finding a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factfind"><span class="tocnumber">3.9.1</span> <span class="toctext">factfind</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Information_about_a_factoid"><span class="tocnumber">3.10</span> <span class="toctext">Information about a factoid</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#factinfo"><span class="tocnumber">3.10.1</span> <span class="toctext">factinfo</span></a></li>
<li class="toclevel-3"><a href="#factshow"><span class="tocnumber">3.10.2</span> <span class="toctext">factshow</span></a></li>
<li class="toclevel-3"><a href="#factset_2"><span class="tocnumber">3.10.3</span> <span class="toctext">factset</span></a></li>
<li class="toclevel-3"><a href="#count"><span class="tocnumber">3.10.4</span> <span class="toctext">count</span></a></li>
<li class="toclevel-3"><a href="#histogram"><span class="tocnumber">3.10.5</span> <span class="toctext">histogram</span></a></li>
<li class="toclevel-3"><a href="#top20"><span class="tocnumber">3.10.6</span> <span class="toctext">top20</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-1"><a href="#Commands"><span class="tocnumber">4</span> <span class="toctext">Commands</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Quotegrabs"><span class="tocnumber">4.1</span> <span class="toctext">Quotegrabs</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Table_of_quotegrabs"><span class="tocnumber">4.1.1</span> <span class="toctext">Table of quotegrabs</span></a></li>
<li class="toclevel-3"><a href="#grab"><span class="tocnumber">4.1.2</span> <span class="toctext">grab</span></a></li>
<li class="toclevel-3"><a href="#getq"><span class="tocnumber">4.1.3</span> <span class="toctext">getq</span></a></li>
<li class="toclevel-3"><a href="#rq"><span class="tocnumber">4.1.4</span> <span class="toctext">rq</span></a></li>
<li class="toclevel-3"><a href="#delq"><span class="tocnumber">4.1.5</span> <span class="toctext">delq</span></a></li>
<li class="toclevel-3"><a href="#recall"><span class="tocnumber">4.1.6</span> <span class="toctext">recall</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Modules"><span class="tocnumber">4.2</span> <span class="toctext">Modules</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#.7B.7D"><span class="tocnumber">4.2.1</span> <span class="toctext">{}</span></a></li>
<li class="toclevel-3"><a href="#cc"><span class="tocnumber">4.2.2</span> <span class="toctext">cc</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#Usage"><span class="tocnumber">4.2.2.1</span> <span class="toctext">Usage</span></a></li>
<li class="toclevel-4"><a href="#Supported_Languages"><span class="tocnumber">4.2.2.2</span> <span class="toctext">Supported Languages</span></a></li>
<li class="toclevel-4"><a href="#Default_Language"><span class="tocnumber">4.2.2.3</span> <span class="toctext">Default Language</span></a></li>
<li class="toclevel-4"><a href="#Disallowed_system_calls"><span class="tocnumber">4.2.2.4</span> <span class="toctext">Disallowed system calls</span></a></li>
<li class="toclevel-4"><a href="#Program_termination_with_no_output"><span class="tocnumber">4.2.2.5</span> <span class="toctext">Program termination with no output</span></a></li>
<li class="toclevel-4"><a href="#Abnormal_program_termination"><span class="tocnumber">4.2.2.6</span> <span class="toctext">Abnormal program termination</span></a></li>
<li class="toclevel-4"><a href="#C_and_C.2B.2B_Functionality"><span class="tocnumber">4.2.2.7</span> <span class="toctext">C and C++ Functionality</span></a></li>
<li class="toclevel-4"><a href="#Using_the_preprocessor"><span class="tocnumber">4.2.2.8</span> <span class="toctext">Using the preprocessor</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#Default_.23includes"><span class="tocnumber">4.2.2.8.1</span> <span class="toctext">Default #includes</span></a></li>
<li class="toclevel-5"><a href="#Using_.23include"><span class="tocnumber">4.2.2.8.2</span> <span class="toctext">Using #include</span></a></li>
<li class="toclevel-5"><a href="#Using_.23define"><span class="tocnumber">4.2.2.8.3</span> <span class="toctext">Using #define</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#main.28.29_Function_Unnecessary"><span class="tocnumber">4.2.2.9</span> <span class="toctext">main() Function Unnecessary</span></a></li>
<li class="toclevel-4"><a href="#Embedding_Newlines"><span class="tocnumber">4.2.2.10</span> <span class="toctext">Embedding Newlines</span></a></li>
<li class="toclevel-4"><a href="#Printing_in_binary.2Fbase2"><span class="tocnumber">4.2.2.11</span> <span class="toctext">Printing in binary/base2</span></a></li>
<li class="toclevel-4"><a href="#Using_the_GDB_debugger"><span class="tocnumber">4.2.2.12</span> <span class="toctext">Using the GDB debugger</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#print"><span class="tocnumber">4.2.2.12.1</span> <span class="toctext">print</span></a></li>
<li class="toclevel-5"><a href="#ptype"><span class="tocnumber">4.2.2.12.2</span> <span class="toctext">ptype</span></a></li>
<li class="toclevel-5"><a href="#watch"><span class="tocnumber">4.2.2.12.3</span> <span class="toctext">watch</span></a></li>
<li class="toclevel-5"><a href="#trace"><span class="tocnumber">4.2.2.12.4</span> <span class="toctext">trace</span></a></li>
<li class="toclevel-5"><a href="#gdb"><span class="tocnumber">4.2.2.12.5</span> <span class="toctext">gdb</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#Interactive_Editing"><span class="tocnumber">4.2.2.13</span> <span class="toctext">Interactive Editing</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#copy"><span class="tocnumber">4.2.2.13.1</span> <span class="toctext">copy</span></a></li>
<li class="toclevel-5"><a href="#show"><span class="tocnumber">4.2.2.13.2</span> <span class="toctext">show</span></a></li>
<li class="toclevel-5"><a href="#diff"><span class="tocnumber">4.2.2.13.3</span> <span class="toctext">diff</span></a></li>
<li class="toclevel-5"><a href="#paste"><span class="tocnumber">4.2.2.13.4</span> <span class="toctext">paste</span></a></li>
<li class="toclevel-5"><a href="#run"><span class="tocnumber">4.2.2.13.5</span> <span class="toctext">run</span></a></li>
<li class="toclevel-5"><a href="#undo"><span class="tocnumber">4.2.2.13.6</span> <span class="toctext">undo</span></a></li>
<li class="toclevel-5"><a href="#s.2F.2F"><span class="tocnumber">4.2.2.13.7</span> <span class="toctext">s//</span></a></li>
<li class="toclevel-5"><a href="#replace"><span class="tocnumber">4.2.2.13.8</span> <span class="toctext">replace</span></a></li>
<li class="toclevel-5"><a href="#prepend"><span class="tocnumber">4.2.2.13.9</span> <span class="toctext">prepend</span></a></li>
<li class="toclevel-5"><a href="#append"><span class="tocnumber">4.2.2.13.10</span> <span class="toctext">append</span></a></li>
<li class="toclevel-5"><a href="#remove"><span class="tocnumber">4.2.2.13.11</span> <span class="toctext">remove</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#Some_Examples"><span class="tocnumber">4.2.2.14</span> <span class="toctext">Some Examples</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#english"><span class="tocnumber">4.2.3</span> <span class="toctext">english</span></a></li>
<li class="toclevel-3"><a href="#expand"><span class="tocnumber">4.2.4</span> <span class="toctext">expand</span></a></li>
<li class="toclevel-3"><a href="#prec"><span class="tocnumber">4.2.5</span> <span class="toctext">prec</span></a></li>
<li class="toclevel-3"><a href="#paren"><span class="tocnumber">4.2.6</span> <span class="toctext">paren</span></a></li>
<li class="toclevel-3"><a href="#faq"><span class="tocnumber">4.2.7</span> <span class="toctext">faq</span></a></li>
<li class="toclevel-3"><a href="#cfact"><span class="tocnumber">4.2.8</span> <span class="toctext">cfact</span></a></li>
<li class="toclevel-3"><a href="#cjeopardy"><span class="tocnumber">4.2.9</span> <span class="toctext">cjeopardy</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#hint"><span class="tocnumber">4.2.9.1</span> <span class="toctext">hint</span></a></li>
<li class="toclevel-4"><a href="#what"><span class="tocnumber">4.2.9.2</span> <span class="toctext">what</span></a></li>
<li class="toclevel-4"><a href="#w"><span class="tocnumber">4.2.9.3</span> <span class="toctext">w</span></a></li>
<li class="toclevel-4"><a href="#score"><span class="tocnumber">4.2.9.4</span> <span class="toctext">score</span></a></li>
<li class="toclevel-4"><a href="#rank"><span class="tocnumber">4.2.9.5</span> <span class="toctext">rank</span></a></li>
<li class="toclevel-4"><a href="#reset"><span class="tocnumber">4.2.9.6</span> <span class="toctext">reset</span></a></li>
<li class="toclevel-4"><a href="#qstats"><span class="tocnumber">4.2.9.7</span> <span class="toctext">qstats</span></a></li>
<li class="toclevel-4"><a href="#qshow"><span class="tocnumber">4.2.9.8</span> <span class="toctext">qshow</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#c99std"><span class="tocnumber">4.2.10</span> <span class="toctext">c99std</span></a></li>
<li class="toclevel-3"><a href="#c11std"><span class="tocnumber">4.2.11</span> <span class="toctext">c11std</span></a></li>
<li class="toclevel-3"><a href="#man"><span class="tocnumber">4.2.12</span> <span class="toctext">man</span></a></li>
<li class="toclevel-3"><a href="#google"><span class="tocnumber">4.2.13</span> <span class="toctext">google</span></a></li>
<li class="toclevel-3"><a href="#define"><span class="tocnumber">4.2.14</span> <span class="toctext">define</span></a></li>
<li class="toclevel-3"><a href="#dict"><span class="tocnumber">4.2.15</span> <span class="toctext">dict</span></a></li>
<li class="toclevel-3"><a href="#foldoc"><span class="tocnumber">4.2.16</span> <span class="toctext">foldoc</span></a></li>
<li class="toclevel-3"><a href="#vera"><span class="tocnumber">4.2.17</span> <span class="toctext">vera</span></a></li>
<li class="toclevel-3"><a href="#udict"><span class="tocnumber">4.2.18</span> <span class="toctext">udict</span></a></li>
<li class="toclevel-3"><a href="#wdict"><span class="tocnumber">4.2.19</span> <span class="toctext">wdict</span></a></li>
<li class="toclevel-3"><a href="#acronym"><span class="tocnumber">4.2.20</span> <span class="toctext">acronym</span></a></li>
<li class="toclevel-3"><a href="#math"><span class="tocnumber">4.2.21</span> <span class="toctext">math</span></a></li>
<li class="toclevel-3"><a href="#compliment"><span class="tocnumber">4.2.22</span> <span class="toctext">compliment</span></a></li>
<li class="toclevel-3"><a href="#insult"><span class="tocnumber">4.2.23</span> <span class="toctext">insult</span></a></li>
<li class="toclevel-3"><a href="#excuse"><span class="tocnumber">4.2.24</span> <span class="toctext">excuse</span></a></li>
<li class="toclevel-3"><a href="#horoscope"><span class="tocnumber">4.2.25</span> <span class="toctext">horoscope</span></a></li>
<li class="toclevel-3"><a href="#horrorscope"><span class="tocnumber">4.2.26</span> <span class="toctext">horrorscope</span></a></li>
<li class="toclevel-3"><a href="#quote"><span class="tocnumber">4.2.27</span> <span class="toctext">quote</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Informative"><span class="tocnumber">4.3</span> <span class="toctext">Informative</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#list"><span class="tocnumber">4.3.1</span> <span class="toctext">list</span></a></li>
<li class="toclevel-3"><a href="#info"><span class="tocnumber">4.3.2</span> <span class="toctext">info</span></a></li>
<li class="toclevel-3"><a href="#version"><span class="tocnumber">4.3.3</span> <span class="toctext">version</span></a></li>
<li class="toclevel-3"><a href="#source"><span class="tocnumber">4.3.4</span> <span class="toctext">source</span></a></li>
<li class="toclevel-3"><a href="#help"><span class="tocnumber">4.3.5</span> <span class="toctext">help</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#Administrative"><span class="tocnumber">4.4</span> <span class="toctext">Administrative</span></a>
<ul>
<li class="toclevel-3"><a href="#login"><span class="tocnumber">4.4.1</span> <span class="toctext">login</span></a></li>
<li class="toclevel-3"><a href="#logout"><span class="tocnumber">4.4.2</span> <span class="toctext">logout</span></a></li>
<li class="toclevel-3"><a href="#Admin_Management"><span class="tocnumber">4.4.3</span> <span class="toctext">Admin Management</span></a>
<ul>
<li class="toclevel-4"><a href="#adminadd"><span class="tocnumber">4.4.3.1</span> <span class="toctext">adminadd</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#Admin_Levels"><span class="tocnumber">4.4.3.1.1</span> <span class="toctext">Admin Levels</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#adminrem"><span class="tocnumber">4.4.3.2</span> <span class="toctext">adminrem</span></a></li>
<li class="toclevel-4"><a href="#adminset"><span class="tocnumber">4.4.3.3</span> <span class="toctext">adminset</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#Admin_Metadata_List"><span class="tocnumber">4.4.3.3.1</span> <span class="toctext">Admin Metadata List</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#adminunset"><span class="tocnumber">4.4.3.4</span> <span class="toctext">adminunset</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#Channel_Management"><span class="tocnumber">4.4.4</span> <span class="toctext">Channel Management</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#chanadd"><span class="tocnumber">4.4.4.1</span> <span class="toctext">chanadd</span></a></li>
<li class="toclevel-4"><a href="#chanrem"><span class="tocnumber">4.4.4.2</span> <span class="toctext">chanrem</span></a></li>
<li class="toclevel-4"><a href="#chanset"><span class="tocnumber">4.4.4.3</span> <span class="toctext">chanset</span></a>
2014-12-31 02:26:26 +01:00
<ul>
2015-10-05 11:27:40 +02:00
<li class="toclevel-5"><a href="#Channel_Metadata_List"><span class="tocnumber">4.4.4.3.1</span> <span class="toctext">Channel Metadata List</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-4"><a href="#chanunset"><span class="tocnumber">4.4.4.4</span> <span class="toctext">chanunset</span></a></li>
<li class="toclevel-4"><a href="#chanlist"><span class="tocnumber">4.4.4.5</span> <span class="toctext">chanlist</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-3"><a href="#ignore"><span class="tocnumber">4.4.5</span> <span class="toctext">ignore</span></a></li>
<li class="toclevel-3"><a href="#unignore"><span class="tocnumber">4.4.6</span> <span class="toctext">unignore</span></a></li>
<li class="toclevel-3"><a href="#whitelist"><span class="tocnumber">4.4.7</span> <span class="toctext">whitelist</span></a></li>
<li class="toclevel-3"><a href="#blacklist"><span class="tocnumber">4.4.8</span> <span class="toctext">blacklist</span></a></li>
<li class="toclevel-3"><a href="#ban"><span class="tocnumber">4.4.9</span> <span class="toctext">ban</span></a></li>
<li class="toclevel-3"><a href="#unban"><span class="tocnumber">4.4.10</span> <span class="toctext">unban</span></a></li>
<li class="toclevel-3"><a href="#kick"><span class="tocnumber">4.4.11</span> <span class="toctext">kick</span></a></li>
<li class="toclevel-3"><a href="#export"><span class="tocnumber">4.4.12</span> <span class="toctext">export</span></a></li>
<li class="toclevel-3"><a href="#refresh"><span class="tocnumber">4.4.13</span> <span class="toctext">refresh</span></a></li>
<li class="toclevel-3"><a href="#sl"><span class="tocnumber">4.4.14</span> <span class="toctext">sl</span></a></li>
<li class="toclevel-3"><a href="#die"><span class="tocnumber">4.4.15</span> <span class="toctext">die</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</li>
2015-10-05 11:27:40 +02:00
<li class="toclevel-2"><a href="#.23.23c"><span class="tocnumber">4.5</span> <span class="toctext">##c</span></a>
<ul>
<li class="toclevel-3"><a href="#C-Aphorisms"><span class="tocnumber">4.5.1</span> <span class="toctext">C-Aphorisms</span></a></li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="#Flood_control"><span class="tocnumber">5</span> <span class="toctext">Flood control</span></a>
<ul>
<li class="toclevel-2"><a href="#Message_flood"><span class="tocnumber">5.1</span> <span class="toctext">Message flood</span></a></li>
<li class="toclevel-2"><a href="#Join_flood"><span class="tocnumber">5.2</span> <span class="toctext">Join flood</span></a></li>
<li class="toclevel-2"><a href="#Enter_key_abuse"><span class="tocnumber">5.3</span> <span class="toctext">Enter key abuse</span></a></li>
<li class="toclevel-2"><a href="#Nick_flood"><span class="tocnumber">5.4</span> <span class="toctext">Nick flood</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Anti-away.2FNick-control"><span class="tocnumber">6</span> <span class="toctext">Anti-away/Nick-control</span></a></li>
<li class="toclevel-1"><a href="#Anti-auto-rejoin_control"><span class="tocnumber">7</span> <span class="toctext">Anti-auto-rejoin control</span></a></li>
<li class="toclevel-1"><a href="#Opping.2FDeopping"><span class="tocnumber">8</span> <span class="toctext">Opping/Deopping</span></a></li>
2014-12-31 02:26:26 +01:00
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2015-10-05 11:27:40 +02:00
<a name="Candide"></a><h2> <span class="mw-headline">Candide</span></h2>
<a name="About_Candide"></a><h3> <span class="mw-headline">About Candide</span></h3>
<p>Candide is an IRC bot written in Perl in pragma_'s spare time.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Source"></a><h4> <span class="mw-headline">Source</span></h4>
<p>Candide's source may be found at these repositories:
2014-12-31 02:26:26 +01:00
</p>
<pre>* <a href="https://github.com/pragma-/pbot" class="external free" title="https://github.com/pragma-/pbot" rel="nofollow">https://github.com/pragma-/pbot</a>
* <a href="https://bitbucket.org/pragmasoft/pbot/src" class="external free" title="https://bitbucket.org/pragmasoft/pbot/src" rel="nofollow">https://bitbucket.org/pragmasoft/pbot/src</a>
</pre>
<p>The URL for the source of any loaded modules may be found by using the <a href="#factinfo" title="">factinfo</a> command:
</p>
<pre> &lt;pragma_&gt; factinfo ##c faq
2015-10-05 11:27:40 +02:00
&lt;candide&gt; faq: Module loaded by pragma_ on Fri Dec 31 02:34:04 2004 -&gt;
2014-12-31 02:26:26 +01:00
<a href="https://github.com/pragma-/pbot/blob/master/modules/cfaq.pl" class="external free" title="https://github.com/pragma-/pbot/blob/master/modules/cfaq.pl" rel="nofollow">https://github.com/pragma-/pbot/blob/master/modules/cfaq.pl</a>, used 512 times (last by ecrane)
</pre>
2015-10-05 11:27:40 +02:00
<a name="Bot_Channel"></a><h4> <span class="mw-headline">Bot Channel</span></h4>
2014-12-31 02:26:26 +01:00
<p>You may test/play with the bot in the #pbot2 channel on irc.freenode.net.
2015-10-05 11:27:40 +02:00
</p><p><br />
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Trigger"></a><h3> <span class="mw-headline">Trigger</span></h3>
<p>All of <b>candide'</b>s commands may begin with its name or its trigger, or be followed by its name.
</p><p>The trigger character defaults to exclaimation mark [!].
</p><p>Note that commands need not be submitted to the channel; you can /msg it instead. If you /msg <b>candide</b>, it will respond with a private message in return. In private message, you do not need to specify its name or one of the trigger symbols.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<pre> Examples:
&lt;pragma_&gt;&nbsp;!hi
&lt;pragma_&gt; hi, candide
&lt;pragma_&gt; candide: hi
</pre>
<a name="Embedded_trigger"></a><h4> <span class="mw-headline">Embedded trigger</span></h4>
<p>Many commands may be triggered from within a sentence. Such commands, however, cannot take any arguments. You can embed up to three triggers in one message.
</p><p>If the sentence begins with a nick that is currently in the channel, the command's response will be prefixed with that nick.
</p>
<pre> Example:
&lt;pragma_&gt; Alice: Check out&nbsp;!K&amp;R for a good book on C. &nbsp;!H&amp;S is also a great reference manual.
&lt;candide&gt; Alice: K&amp;R is The C Programming Language, 2nd edition, by Kernighan and Ritchie
- <a href="http://wayback.archive-it.org/5263/20150203070038/http://cm.bell-labs.com/cm/cs/cbook/" class="external free" title="http://wayback.archive-it.org/5263/20150203070038/http://cm.bell-labs.com/cm/cs/cbook/" rel="nofollow">http://wayback.archive-it.org/5263/20150203070038/http://cm.bell-labs.com/cm/cs/cbook/</a>
- errata: <a href="http://www.iso-9899.info/2ediffs.html" class="external free" title="http://www.iso-9899.info/2ediffs.html" rel="nofollow">http://www.iso-9899.info/2ediffs.html</a>
&lt;candide&gt; Alice: H&amp;S is "C - A Reference Manual" by Harbison &amp; Steele; a reference for C on par with K&amp;R
- <a href="http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/013089592X" class="external free" title="http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/013089592X" rel="nofollow">http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/013089592X</a>
</pre>
<a name="Directing_output_to_a_user"></a><h4> <span class="mw-headline">Directing output to a user</span></h4>
<p>You may direct candide to prepend the nickname of a specific person to a factoid in the channel by stating the nickname after the factoid (if the factoid doesn't take arguments):
</p>
<pre> &lt;pragma_&gt; candide: version defrost
&lt;candide&gt; defrost: PBot revision 387 2012-10-07
2014-12-31 02:26:26 +01:00
</pre>
<a name="tell"></a><h5> <span class="mw-headline">tell</span></h5>
<p>You may also use the `tell &lt;nick&gt; about &lt;command&gt;` syntax (which is necessary if the factoid does take arguments):
</p>
2015-10-05 11:27:40 +02:00
<pre> &lt;pragma_&gt; candide: tell defrost about help cc
&lt;candide&gt; defrost: To learn all about cc, see <a href="http://www.iso-9899.info/wiki/Candide#cc" class="external free" title="http://www.iso-9899.info/wiki/Candide#cc" rel="nofollow">http://www.iso-9899.info/wiki/Candide#cc</a>
</pre>
<a name="Registry"></a><h2> <span class="mw-headline">Registry</span></h2>
<p>Candide's behavior can be customized via a central registry of key/value pairs segregated by sections.
</p><p>There are two types of registry values: literals and arrays. Literals can be strings, floats or integers. Arrays are comma-separated lists of literals.
</p>
<a name="Overriding_registry_values_per-channel"></a><h3> <span class="mw-headline">Overriding registry values per-channel</span></h3>
<p>Some key/value pairs belonging to a specific section may be overridden on a per-channel basis by setting the key/value in a channel-specific section.
</p><p>For example, the bot's trigger is defined in general-&gt;trigger. You may add a trigger key in #channel to override the trigger value for that channel: #channel-&gt;trigger.
</p><p>For another example, the anti-flood max lines is defined in antiflood-&gt;chat_flood_threshold. To override this setting in #coolchannel, you can set #coolchannel-&gt;chat_flood_threshold.
</p>
<a name="regadd"></a><h3> <span class="mw-headline">regadd</span></h3>
<p>regadd adds a new registry value to a specific section/channel.
</p>
<pre>Usage: regadd &lt;section&gt; &lt;key&gt; &lt;value&gt;
</pre>
<pre>Example:
&lt;pragma&gt; regadd #mychannel trigger [,!%]
&lt;candide&gt; [#mychannel] trigger set to [,!%]
</pre>
<p>Some registry values can be regular expressions, like the above trigger example. Setting general-&gt;trigger to the character class [,!%] means that it will respond to ,&nbsp;! and&nbsp;% as trigger characters on a general basis. You can set #somechannel-&gt;trigger to something else to override this for that specific channel.
</p>
<a name="regrem"></a><h3> <span class="mw-headline">regrem</span></h3>
<p>regrem removes a registry key from a specific section/channel.
</p>
<pre>Usage: regrem &lt;section&gt; &lt;key&gt;
</pre>
<a name="regshow"></a><h3> <span class="mw-headline">regshow</span></h3>
<p>regshow displays the type and value of a specific key.
</p>
<pre>Usage: regshow &lt;section&gt; &lt;key&gt;
</pre>
<pre>Example:
&lt;pragma&gt; regshow antiflood chat_flood_punishment
&lt;candide&gt; [antiflood] chat_flood_punishment: 60,300,3600,86400,604800,2419200 [array]
</pre>
<a name="regset"></a><h3> <span class="mw-headline">regset</span></h3>
<p>regset sets the meta-data values for a specific registry key. See <a href="#Registry_metadata_list" title="">registry meta-data list</a>.
</p><p>If you omit the &lt;key&gt; argument, it will list all the defined keys and values for the registry item. If you specify &lt;key&gt; but omit &lt;value&gt;, it will show the value for that specific key.
</p>
<pre>Usage: regset &lt;section&gt; &lt;item&gt; [key [value]]
</pre>
<pre>Example:
&lt;pragma&gt; regset irc botnick value pangloss
* candide changed nick to pangloss
&lt;pangloss&gt; [irc] botnick: 'value' set to 'pangloss'
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<a name="Registry_metadata_list"></a><h4> <span class="mw-headline">Registry metadata list</span></h4>
<p>This is a list of recognized registry meta-data keys.
</p>
<ul><li> <i>type</i>: sets the type of this registry key; <i>text</i> (literal) or <i>array</i>.
</li><li> <i>value</i>: the value of this registry key.
</li><li> <i>private</i>: whether the value of the registry key is displayed in regset, regshow or regfind. If set to a true value, the value of the registry key will be shown as "&lt;private&gt;".
</li></ul>
<a name="regunset"></a><h3> <span class="mw-headline">regunset</span></h3>
<p>regunset deletes a meta-data key from a registry key.
</p>
<pre>Usage: regunset &lt;section&gt; &lt;item&gt; &lt;key&gt;
</pre>
<a name="regchange"></a><h3> <span class="mw-headline">regchange</span></h3>
<p>regchange changes the value of a registry item using a regular substitution expression.
</p>
<pre>Usage: regchange &lt;section&gt; &lt;item&gt; s/&lt;pattern&gt;/&lt;replacement&gt;/
</pre>
<pre>Example:
&lt;pragma&gt; regadd foo bar Hello, world!
&lt;candide&gt; [foo] bar set to Hello, world!
&lt;pragma&gt; regchange foo bar s/world/universe/
&lt;candide&gt; [foo] bar set to Hello, universe!
</pre>
<a name="regfind"></a><h3> <span class="mw-headline">regfind</span></h3>
<p>regfind searches for registry items, and may optionally show the values of all matching items.
</p>
<pre>Usage: regfind [-showvalues] [-section &lt;section&gt;] &lt;regex&gt;
</pre>
<p>To limit the search to a specific section, use -section &lt;section&gt;. To dump the entire registry, use `regfind -showvalues .*`
</p>
<a name="Creating_array_values"></a><h3> <span class="mw-headline">Creating array values</span></h3>
<p>Use the <a href="#regset" title="">regset</a> command to change the <i>type</i> meta-data value to "array", and set the registry value to a comma-separated list of values.
</p>
<pre>Example:
&lt;pragma&gt; regadd foo animals aardvark, badger, cat, dingo
&lt;candide&gt; [foo] animals set to aardvark, badger, cat, dingo
&lt;pragma&gt; regset foo animals type array
&lt;candide&gt; [foo] animals: 'type' set to 'array'
</pre>
<a name="List_of_recognized_registry_items"></a><h3> <span class="mw-headline">List of recognized registry items</span></h3>
<ul><li> antiaway-&gt;bad_actions
</li><li> antiaway-&gt;bad_nicks
</li><li> antiaway-&gt;kick_msg
</li><li> antiflood-&gt;chat_flood_punishment
</li><li> antiflood-&gt;chat_flood_threshold
</li><li> antiflood-&gt;chat_flood_time_threshold
</li><li> antiflood-&gt;debug_checkban
</li><li> antiflood-&gt;dont_enforce_admins
</li><li> antiflood-&gt;enforce
</li><li> antiflood-&gt;enter_abuse_max_offenses
</li><li> antiflood-&gt;enter_abuse_punishment
</li><li> antiflood-&gt;enter_abuse_threshold
</li><li> antiflood-&gt;enter_abuse_time_threshold
</li><li> antiflood-&gt;join_flood_punishment
</li><li> antiflood-&gt;join_flood_threshold
</li><li> antiflood-&gt;join_flood_time_threshold
</li><li> antiflood-&gt;nick_flood_punishment
</li><li> antiflood-&gt;nick_flood_threshold
</li><li> antiflood-&gt;nick_flood_time_threshold
</li><li> antikickautorejoin-&gt;punishment
</li><li> antikickautorejoin-&gt;threshold
</li><li> bantracker-&gt;chanserv_ban_timeout
</li><li> bantracker-&gt;debug
</li><li> bantracker-&gt;mute_timeout
</li><li> factoids-&gt;default_rate_limit
</li><li> general-&gt;compile_blocks_channels
</li><li> general-&gt;compile_blocks
</li><li> general-&gt;compile_blocks_ignore_channels
</li><li> general-&gt;config_dir
</li><li> general-&gt;data_dir
</li><li> general-&gt;deop_timeout
</li><li> general-&gt;module_dir
</li><li> general-&gt;module_repo
</li><li> general-&gt;paste_ratelimit
</li><li> general-&gt;show_url_titles_channels
</li><li> general-&gt;show_url_titles
</li><li> general-&gt;show_url_titles_ignore_channels
</li><li> general-&gt;trigger
</li><li> interpreter-&gt;max_recursion
</li><li> irc-&gt;botnick
</li><li> irc-&gt;debug
</li><li> irc-&gt;identify_password
</li><li> irc-&gt;ircname
</li><li> irc-&gt;ircserver
</li><li> irc-&gt;log_default_handler
</li><li> irc-&gt;max_msg_len
</li><li> irc-&gt;port
</li><li> irc-&gt;show_motd
</li><li> irc-&gt;SSL_ca_file
</li><li> irc-&gt;SSL_ca_path
</li><li> irc-&gt;SSL
</li><li> irc-&gt;username
</li><li> lagchecker-&gt;lag_history_interval
</li><li> lagchecker-&gt;lag_history_max
</li><li> lagchecker-&gt;lag_threshold
</li><li> messagehistory-&gt;debug_aka
</li><li> messagehistory-&gt;debug_link
</li><li> messagehistory-&gt;max_messages
</li><li> messagehistory-&gt;sqlite_commit_interval
</li><li> messagehistory-&gt;sqlite_debug
</li><li> nicklist-&gt;debug
</li><li> [channel]-&gt;dont_enforce_antiflood
</li><li> [channel]-&gt;max_newlines
</li><li> [channel]-&gt;no_url_titles
</li><li> [channel]-&gt;no_compile_blocks
</li><li> [channel]-&gt;preserve_newlines
</li></ul>
2014-12-31 02:26:26 +01:00
<a name="Factoids"></a><h2> <span class="mw-headline">Factoids</span></h2>
<a name="List_of_factoids"></a><h3> <span class="mw-headline">List of factoids</span></h3>
<p>The most recent exported list of factoids can be found here:
2015-10-05 11:27:40 +02:00
<a href="http://www.iso-9899.info/candide/factoids.html" class="external free" title="http://www.iso-9899.info/candide/factoids.html" rel="nofollow">http://www.iso-9899.info/candide/factoids.html</a>.
2014-12-31 02:26:26 +01:00
</p>
<a name="Channel_namespaces"></a><h4> <span class="mw-headline">Channel namespaces</span></h4>
<p>Factoids added in one channel may be called/triggered in another channel or in private message, providing that the other channel doesn't already have a factoid of the same name.
</p><p>Factoids may also be added to a special channel named global. Factoids that are set in this channel will be accessible to any channel, including private messages. However, factoids that are set in a specific channel will override factoids of the same name that are set in the global channel or other channels.
</p><p>For example, a factoid named 'malloc' set in ##c will be called instead of 'malloc' set in global,
if the factoid were triggered in ##c; otherwise, the latter 'malloc' will be triggered if the factoid were triggered in another channel.
</p><p>Similiarily, if there were no 'malloc' factoid in the global namespace, but only in ##c and you attempted to use this factoid in a channel other than ##c, that channel will invoke ##c's version of 'malloc', providing that channel doesn't have its own 'malloc' factoid.
</p><p>Likewise, if there is a 'malloc' factoid set in ##c++ and the factoid is triggered in the ##c++ channel,
then this version of 'malloc' will be called instead of the ##c or the global factoid.
</p><p>However, if you are in a channel that doesn't have a 'malloc' factoid and there is no 'malloc' factoid in the global channel, and you attempt to call 'malloc' then the bot will display a message notifying you that 'malloc' is ambiguous and which channels it belongs to so that you may use the <a href="#fact" title="">fact</a> command to call the correct factoid.
</p>
<a name="Adding_a_factoid"></a><h3> <span class="mw-headline">Adding a factoid</span></h3>
<a name="factadd"></a><h4> <span class="mw-headline">factadd</span></h4>
<pre> Usage:
factadd &lt;channel&gt; &lt;keyword&gt; is &lt;description&gt;
</pre>
<p>To add a factoid to the global channel, use global as the channel.
</p>
<pre> Example:
&lt;pragma_&gt; factadd ##c c is /say C rocks!
</pre>
<a name="Special_commands"></a><h4> <span class="mw-headline">Special commands</span></h4>
<a name=".2Fsay"></a><h5> <span class="mw-headline">/say</span></h5>
2015-10-05 11:27:40 +02:00
<p>If a factoid begins with "/say " then candide will not use
2014-12-31 02:26:26 +01:00
the "&lt;factoid&gt; is &lt;description&gt;" format when displaying the
factoid.
</p>
<pre> Example:
&lt;pragma_&gt; factadd global hi is /say Well, hello there, $nick.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'hi' added to the global channel
&lt;prec&gt; candide, hi
&lt;candide&gt; Well, hello there, prec.
2014-12-31 02:26:26 +01:00
</pre>
<a name=".2Fme"></a><h5> <span class="mw-headline">/me</span></h5>
2015-10-05 11:27:40 +02:00
<p>If a factoid begins with "/me " then candide will ACTION the factoid.
2014-12-31 02:26:26 +01:00
</p>
<pre> Example:
&lt;pragma_&gt; factadd global bounce is /me bounces around.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'bounce' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; bounce
2015-10-05 11:27:40 +02:00
*candide bounces around.
2014-12-31 02:26:26 +01:00
</pre>
<a name=".2Fcall"></a><h5> <span class="mw-headline">/call</span></h5>
2015-10-05 11:27:40 +02:00
<p>If a factoid begins with "/call " then candide will call an existing command.
2014-12-31 02:26:26 +01:00
</p>
<pre> Example:
&lt;pragma_&gt; factadd global boing is /call bounce
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'boing' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; boing
2015-10-05 11:27:40 +02:00
*candide bounces around.
2014-12-31 02:26:26 +01:00
</pre>
<a name=".2Fmsg"></a><h5> <span class="mw-headline">/msg</span></h5>
2015-10-05 11:27:40 +02:00
<p>If a factoid begins with "/msg &lt;nick&gt; " then candide will /MSG the factoid
2014-12-31 02:26:26 +01:00
text to &lt;nick&gt;
</p>
<a name="Special_variables"></a><h4> <span class="mw-headline">Special variables</span></h4>
2015-10-05 11:27:40 +02:00
<p>You can use the following variables in a factoid or as an argument to one.
2014-12-31 02:26:26 +01:00
</p>
<a name=".24nick"></a><h5> <span class="mw-headline">$nick</span></h5>
2015-10-05 11:27:40 +02:00
<p>$nick expands to the nick of the caller.
</p>
2014-12-31 02:26:26 +01:00
<a name=".24args"></a><h5> <span class="mw-headline">$args</span></h5>
2015-10-05 11:27:40 +02:00
<p>$args expands to any text following the keyword. If there is no text then it expands to the nick of the caller.
</p>
<a name=".24arg.5Bn.5D"></a><h5> <span class="mw-headline">$arg[n]</span></h5>
<p>$arg[n] expands to the nth argument. Indexing begins from 0 (the first argument is $arg[0]). You may use a negative number to count from the end; e.g., $arg[-2] means the 2nd argument from the end. Multiple words can be double-quoted to constitute one argument. If the argument does not exist, the variable and the leading space before it will be silently removed.
</p>
<a name=".24arg.5Bn:m.5D"></a><h5> <span class="mw-headline">$arg[n:m]</span></h5>
<p>$arg[n:m] expands to a slice of arguments between n and m. Indexing begins from 0 (the first argument is $arg[0]). Not specifying the m value means the rest of the arguments; e.g., $arg[2:] means the remaining arguments after the first two. Multiple words can be double-quoted to constitute one argument. If the argument does not exist, the variable and the leading space before it will be silently removed.
</p>
2014-12-31 02:26:26 +01:00
<a name=".24channel"></a><h5> <span class="mw-headline">$channel</span></h5>
2015-10-05 11:27:40 +02:00
<p>$channel expands to the name of the channel in which the factoid is used.
</p>
<a name=".24randomnick"></a><h5> <span class="mw-headline">$randomnick</span></h5>
<p>$randomnick expands to a random nick from the channel in which the factoid is used.
</p>
2014-12-31 02:26:26 +01:00
<a name="adlib_list_variables"></a><h4> <span class="mw-headline">adlib list variables</span></h4>
<p>You may create a list of adlib words by using the normal factoid creation method.
2015-10-05 11:27:40 +02:00
Multiple words can be surrounded with double quotes to constitute one element.
2014-12-31 02:26:26 +01:00
</p>
<pre> Example:
&lt;pragma_&gt; factadd global colors is red green blue "bright yellow" pink "dark purple" orange
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'colors' added to the global channel
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<p>Then you can instruct candide to pick a random word from this list to use in another factoid by
2014-12-31 02:26:26 +01:00
inserting the list as a variable.
</p>
<pre> Example:
&lt;pragma_&gt; factadd global sky is /say The sky is $colors.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'sky' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; sky
2015-10-05 11:27:40 +02:00
&lt;candide&gt; The sky is dark purple.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; sky
2015-10-05 11:27:40 +02:00
&lt;candide&gt; The sky is green.
2014-12-31 02:26:26 +01:00
</pre>
<p>A practical example, creating the RTFM trigger:
</p>
<pre> &lt;pragma_&gt; factadd global sizes is big large tiny small huge gigantic teeny
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'sizes' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factadd global attacks is whaps thwacks bashes smacks punts whacks
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'attacks' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factadd global rtfm is /me $attacks $args with a $sizes $colors manual.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'rtfm' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; rtfm mauke
2015-10-05 11:27:40 +02:00
* candide thwacks mauke with a big red manual.
</pre>
<a name="modifiers"></a><h5> <span class="mw-headline">modifiers</span></h5>
<p>Adlib list variables can accept trailing modifier keywords prefixed with a colon. These can be chained together to combine their effects.
</p>
<ul><li>&nbsp;:uc - uppercases the expansion
</li><li>&nbsp;:lc - lowercases the expansion
</li><li>&nbsp;:ucfirst - uppercases the first letter in the expansion
</li><li>&nbsp;:title - lowercases the expansion and then uppercases the first letter (effectively an alias for&nbsp;:lc:ucfirst)
</li><li>&nbsp;:&lt;channel&gt; - looks for variable in &lt;channel&gt; first; use "global" to refer to the global channel
</li></ul>
<pre> Example:
&lt;pragma_&gt; echo $colors:uc
&lt;candide&gt; RED
&lt;pragma_&gt; echo $colors:ucfirst
&lt;candide&gt; Blue
2014-12-31 02:26:26 +01:00
</pre>
<a name="action_with_args"></a><h4> <span class="mw-headline">action_with_args</span></h4>
<p>You can use the <a href="#factset" title="">factset</a> command to set a special factoid meta-data key named "action_with_args" to trigger an alternate message if an argument has been supplied.
</p>
<pre> Example:
&lt;pragma_&gt; factadd global snack is /me eats a cookie.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'snack' added to the global channel
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factset global snack action_with_args /me gives $args a cookie.
2015-10-05 11:27:40 +02:00
&lt;candide&gt; [Factoids] (global) snack: 'action_with_args' set to '/me gives $args a cookie.'
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; snack
2015-10-05 11:27:40 +02:00
* candide eats a cookie.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; snack orbitz
2015-10-05 11:27:40 +02:00
* candide gives orbitz a cookie.
2014-12-31 02:26:26 +01:00
</pre>
<a name="add_nick"></a><h4> <span class="mw-headline">add_nick</span></h4>
<p>You can use the <a href="#factset" title="">factset</a> command to set a special factoid meta-data key named "add_nick" to prepend the nick of the caller to the output. This is mostly useful for modules.
</p>
<a name="Deleting_a_factoid"></a><h3> <span class="mw-headline">Deleting a factoid</span></h3>
<a name="factrem"></a><h4> <span class="mw-headline">factrem</span></h4>
<a name="forget"></a><h4> <span class="mw-headline">forget</span></h4>
<p>To remove a factoid, use the factrem or forget command. The syntax is:
</p>
<pre> factrem &lt;channel&gt; &lt;keyword&gt;
forget &lt;channel&gt; &lt;keyword&gt;
</pre>
<a name="Viewing.2Ftriggering_a_factoid"></a><h3> <span class="mw-headline">Viewing/triggering a factoid</span></h3>
<p>To view or trigger a factoid, one merely issues its keyword as a command.
</p>
2015-10-05 11:27:40 +02:00
<pre> &lt;pragma_&gt; candide, c?
&lt;candide&gt; C rocks!
2014-12-31 02:26:26 +01:00
</pre>
<a name="Viewing.2Ftriggering_another_channel.27s_factoid"></a><h3> <span class="mw-headline">Viewing/triggering another channel's factoid</span></h3>
<a name="fact"></a><h4> <span class="mw-headline">fact</span></h4>
<p>To view or trigger a factoid belonging to a specific channel, use the fact command:
</p>
<pre> fact &lt;channel&gt; &lt;keyword&gt; [arguments]
</pre>
<a name="Aliasing_a_factoid"></a><h3> <span class="mw-headline">Aliasing a factoid</span></h3>
<a name="factalias"></a><h4> <span class="mw-headline">factalias</span></h4>
<p>To create an factoid that acts as an alias for a command, use the 'factalias' command or '&lt;alias&gt; is /call &lt;command&gt;'.
</p>
<pre> &lt;newalias&gt; is /call &lt;command&gt;
</pre>
<p>The syntax for 'factalias' is:
</p>
<pre> factalias &lt;channel&gt; &lt;new keyword&gt; &lt;command&gt;
</pre>
<pre> Example:
&lt;pragma_&gt; factadd ##c book is /me points accusingly at $args, "Where is your book?!"
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'book' added to ##c
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; book newbie
2015-10-05 11:27:40 +02:00
*candide points accusingly at newbie, "Where is your book?!"
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factadd ##c rafb is /call book
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 'rafb' added to ##c
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; rafb runtime
2015-10-05 11:27:40 +02:00
*candide points accusingly at runtime, "Where is your book?!"
2014-12-31 02:26:26 +01:00
</pre>
<pre> Another example:
&lt;pragma_&gt; factadd ##c offtopic is /say In this channel, '$args' is off-topic.
&lt;pragma_&gt; offtopic C++
2015-10-05 11:27:40 +02:00
&lt;candide&gt; In this channel, 'C++' is off-topic.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factalias ##c C++ offtopic C++ <i>(alternatively: factadd ##c C++ is /call offtopic C++)</i>
&lt;pragma_&gt; C++
2015-10-05 11:27:40 +02:00
&lt;candide&gt; In this channel, 'C++' is off-topic.
2014-12-31 02:26:26 +01:00
</pre>
<a name="Moving.2Frenaming_a_factoid"></a><h3> <span class="mw-headline">Moving/renaming a factoid</span></h3>
<a name="factmove"></a><h4> <span class="mw-headline">factmove</span></h4>
<p>To rename a factoid or move a factoid to a different channel, use the 'factmove' command:
</p>
<pre> Usage: factmove &lt;source channel&gt; &lt;source factoid&gt; &lt;target channel/factoid&gt; [target factoid]
</pre>
<p>If three arguments are given, the factoid is renamed in the source channel. If four arguments are given, the factoid is moved to the target channel with the target name.
</p>
<a name="Changing_a_factoid"></a><h3> <span class="mw-headline">Changing a factoid</span></h3>
<a name="factchange"></a><h4> <span class="mw-headline">factchange</span></h4>
<p>To change a factoid, use the 'factchange' command:
</p>
<pre> Usage: factchange &lt;channel&gt; &lt;keyword&gt; s/&lt;pattern&gt;/&lt;change to&gt;/<br />
&lt;pragma_&gt; c
2015-10-05 11:27:40 +02:00
&lt;candide&gt; C rocks!
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; factchange ##c c s/rocks/rules/
2015-10-05 11:27:40 +02:00
&lt;candide&gt; c changed.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; c
2015-10-05 11:27:40 +02:00
&lt;candide&gt; C rules!
2014-12-31 02:26:26 +01:00
</pre>
<p>Note that the final argument is a Perl-style substitution regex. See 'man perlre'.
</p>
<pre> For instance, it is possible to append to a factoid by using:
'factchange channel factoid s/$/text to append/'
</pre>
<pre> Likewise, you can prepend to a factoid by using:
'factchange channel factoid s/^/text to prepend/'
</pre>
<p>Alternatively, you may append to a factoid by using 'is also':
</p>
2015-10-05 11:27:40 +02:00
<pre> &lt;pragma_&gt; candide, c is also See FAQ at <a href="http://www.eskimo.com/~scs/C-faq/top.html" class="external free" title="http://www.eskimo.com/~scs/C-faq/top.html" rel="nofollow">http://www.eskimo.com/~scs/C-faq/top.html</a>
&lt;candide&gt; Changed: c is /say C rules!&nbsp;; See FAQ at <a href="http://www.eskimo.com/~scs/C-faq/top.html" class="external free" title="http://www.eskimo.com/~scs/C-faq/top.html" rel="nofollow">http://www.eskimo.com/~scs/C-faq/top.html</a>
2014-12-31 02:26:26 +01:00
</pre>
<a name="factset"></a><h4> <span class="mw-headline">factset</span></h4>
2015-10-05 11:27:40 +02:00
<p>To view or set factoid meta-data, such as owner, rate-limit, etc, use the 'factset' command. See also: <a href="#Factoid_Metadata_List" title="">factoid metadata list</a>.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: factset &lt;channel&gt; &lt;factoid&gt; [&lt;key&gt; [value]]
</pre>
<p>Omit &lt;key&gt; and &lt;value&gt; to list all the keys and values for a factoid. Specify &lt;key&gt;, but omit &lt;value&gt; to see the value for a specific key.
</p>
2015-10-05 11:27:40 +02:00
<a name="Factoid_Metadata_List"></a><h5> <span class="mw-headline">Factoid Metadata List</span></h5>
<p>This is a list of recognized factoid meta-data fields. The number in parentheses next to the field is the minimum admin level necessary to modify it; if there is no such number then anybody may modify it.
</p>
<ul><li> created_on (90): The timestamp of when the factoid was created.
</li><li> enabled (10): Whether the factoid can be invoked or not.
</li><li> last_referenced_in (90): The channel or private-message in which the factoid was last used.
</li><li> last_referenced_on (90): The timestamp of when the factoid was last used.
</li><li> modulelauncher_subpattern (90): A substitution expression used to modify the arguments into a command-line.
</li><li> owner (90): The creator of the factoid.
</li><li> rate_limit (10): How often the factoid may be invoked, in seconds. Zero for unlimited.
</li><li> ref_count (90): How many times the factoid has been invoked.
</li><li> ref_user (90): The hostmask of the last person to invoke the factoid.
</li><li> type (90): The type of the factoid. "text" for regular factoid; "module" for module.
</li><li> edited_by (90): The hostmask of the person to last edit the factoid.
</li><li> edited_on (90): The timestamp of when the factoid was last edited.
</li><li> locked (10): If enabled, prevents the factoid from being changed or removed.
</li><li> add_nick (10): Prepends the nick of the person invoking the factoid to the output of the factoid.
</li><li> nooverride (10): Prevents the creation of a factoid with an identical name in a different channel.
</li><li> action_with_args: Alternate action to perform if an argument has been supplied when invoking the factoid.
</li><li> noembed: Factoid will not be triggered if embedded within a sentence.
</li></ul>
2014-12-31 02:26:26 +01:00
<a name="factunset"></a><h4> <span class="mw-headline">factunset</span></h4>
<p>To unset factoid meta-data, use the 'factunset' command.
</p>
<pre> Usage: factunset &lt;channel&gt; &lt;factoid&gt; &lt;key&gt;
</pre>
<a name="Finding_a_factoid"></a><h3> <span class="mw-headline">Finding a factoid</span></h3>
<a name="factfind"></a><h4> <span class="mw-headline">factfind</span></h4>
<p>To search the database for a factoid, you may use the 'factfind' command. You may optionally
specify whether to narrow by channel and/or include factoid owner and/or last referenced by in the search.
2015-10-05 11:27:40 +02:00
</p><p>If there is only one match for the query, it will display that factoid and its text, otherwise it will list all matching keywords.
2014-12-31 02:26:26 +01:00
</p>
<pre>Usage: factfind [-channel channel] [-owner nick] [-by nick] [text]
Example:
2015-10-05 11:27:40 +02:00
&lt;pragma_&gt; candide, factfind cast
&lt;candide&gt; 3 factoids match: [##c] NULL casting dontcastmalloc
2014-12-31 02:26:26 +01:00
</pre>
<a name="Information_about_a_factoid"></a><h3> <span class="mw-headline">Information about a factoid</span></h3>
<a name="factinfo"></a><h4> <span class="mw-headline">factinfo</span></h4>
<p>To get information about a factoid, such as who submitted it and when, use the 'factinfo' command:
</p>
2015-10-05 11:27:40 +02:00
<pre> factinfo [channel] &lt;keyword&gt;
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<pre> &lt;pragma_&gt; candide, factinfo ##c NULL
&lt;candide&gt; NULL: Factoid submitted by Major-Willard for all channels on Sat Jan 1 16:17:42 2005
2014-12-31 02:26:26 +01:00
[5 years and 178 days ago], referenced 39 times (last by pragma_ on Sun Jun 27 04:40:32 2010 [5 seconds ago])
</pre>
<p>If the factoid has been submitted for the special global channel, then it will be shown as 'submitted for all channels'. Otherwise,
it will be shown as 'submitted for #channel'.
</p>
<a name="factshow"></a><h4> <span class="mw-headline">factshow</span></h4>
<p>To see the factoid string literal, use the 'factshow' command:
</p>
2015-10-05 11:27:40 +02:00
<pre> factshow [channel] &lt;keyword&gt;
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;pragma_&gt; factshow ##c hi
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hi: /say $greetings, $nick.
2014-12-31 02:26:26 +01:00
</pre>
<a name="factset_2"></a><h4> <span class="mw-headline">factset</span></h4>
<p>To view factoid meta-data, such as owner, rate-limit, etc, use the 'factset' command.
</p>
<pre> Usage: factset &lt;channel&gt; &lt;factoid&gt; [&lt;key&gt; [value]]
</pre>
<p>Omit &lt;key&gt; and &lt;value&gt; to list all the keys and values for a factoid. Specify &lt;key&gt;, but omit &lt;value&gt; to see the value for a specific key.
</p>
<a name="count"></a><h4> <span class="mw-headline">count</span></h4>
<p>To see how many factoids and what percentage of the database &lt;nick&gt; has submitted, use the 'count' command:
</p>
<pre> &lt;pragma_&gt; count prec
2015-10-05 11:27:40 +02:00
&lt;candide&gt; prec has submitted 28 factoids out of 233 (12%)
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; count twkm
2015-10-05 11:27:40 +02:00
&lt;candide&gt; twkm has submitted 74 factoids out of 233 (31%)
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; count pragma
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma has submitted 27 factoids out of 233 (11%)
2014-12-31 02:26:26 +01:00
</pre>
<a name="histogram"></a><h4> <span class="mw-headline">histogram</span></h4>
<p>To see a histogram of the top 10 factoid submitters, use the 'histogram' command:
</p>
<pre> &lt;pragma_&gt; histogram
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 268 factoids, top 10 submitters: twkm: 74 (27%) Major-Willard:
2014-12-31 02:26:26 +01:00
64 (23%) pragma_: 40 (14%) prec: 39 (14%) defrost: 14 (5%)
PoppaVic: 10 (3%) infobahn: 7 (2%) orbitz: 3 (1%) mauke: 3
(1%) Tom^: 2 (1%)
</pre>
<a name="top20"></a><h4> <span class="mw-headline">top20</span></h4>
<p>To see the top 20 most popular factoids, use the 'top20' command.
</p>
<a name="Commands"></a><h2> <span class="mw-headline">Commands</span></h2>
<p>To see all the currently available commands, use the <b>list commands</b> command.
</p><p>Some commands are:
</p>
<a name="Quotegrabs"></a><h3> <span class="mw-headline">Quotegrabs</span></h3>
<a name="Table_of_quotegrabs"></a><h4> <span class="mw-headline">Table of quotegrabs</span></h4>
2015-10-05 11:27:40 +02:00
<p>A table of grabbed quotes can be found here: <a href="http://www.iso-9899.info/candide/quotegrabs.html" class="external free" title="http://www.iso-9899.info/candide/quotegrabs.html" rel="nofollow">http://www.iso-9899.info/candide/quotegrabs.html</a>
2014-12-31 02:26:26 +01:00
</p>
<a name="grab"></a><h4> <span class="mw-headline">grab</span></h4>
<p>Grabs a message someone says, and adds it to the quotegrabs database. You may grab multiple nicks/messages in one quotegrab by separating the arguments with a plus sign (the nicks need not be different -- you can grab multiple messages by the same nick by specifying a different history for each grab).
</p><p>You can use the <a href="#recall" title="">recall</a> command to test the arguments before grabbing (please use a private message).
</p>
<pre>Usage: grab &lt;nick&gt; [history [channel]] [+ ...]
where [history] is an optional argument regular expression used to search message contents;
e.g., to grab a message containing the text "pizza", use: grab nick pizza
</pre>
<pre>Examples:
</pre>
<pre> &lt;bob&gt; Clowns are scary.
&lt;pragma-&gt; grab bob clowns
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Quote grabbed: 1: &lt;bob&gt; Clowns are scary.
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;alice&gt; Please put that in the right place.
&lt;bob&gt; That's what she said!
&lt;pragma-&gt; grab alice place + bob said
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Quote grabbed 2: &lt;alice&gt; Please put that in the right place. &lt;bob&gt; That's what she said!
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;charlie&gt; I know a funny programming knock-knock joke.
&lt;charlie&gt; Knock knock!
&lt;charlie&gt; Race condition.
&lt;charlie&gt; Who's there?
&lt;pragma-&gt; grab charlie knock + charlie race + charlie there
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Quote grabbed 3: &lt;charlie&gt; Knock knock! &lt;charlie&gt; Race condition. &lt;charlie&gt; Who's there?
2014-12-31 02:26:26 +01:00
</pre>
<a name="getq"></a><h4> <span class="mw-headline">getq</span></h4>
<p>Retrieves and displays a specific grabbed quote from the quotegrabs database.
</p>
<pre>Usage: getq &lt;quote-id&gt;
</pre>
<a name="rq"></a><h4> <span class="mw-headline">rq</span></h4>
<p>Retrieves and displays a random grabbed quote from the quotegrabs database. You may filter by nick, channel and/or quote text.
</p>
<pre>Usage: rq [nick [channel [text]]] [-c,--channel &lt;channel&gt;] [-t,--text &lt;text&gt;]
</pre>
<a name="delq"></a><h4> <span class="mw-headline">delq</span></h4>
<p>Deletes a specific grabbed quote from the quotegrabs database. You can only delete quotes you have grabbed unless you are logged in as an admin.
</p>
<pre>Usage: delq &lt;quote-id&gt;
</pre>
2015-10-05 11:27:40 +02:00
<a name="recall"></a><h4> <span class="mw-headline">recall</span></h4>
<p>Recalls messages from the chat history and displays them with a relative time-stamp.
</p>
<pre> Usage: recall &lt;[nick [history [channel]]] [-c,channel &lt;channel&gt;] [-t,text,h,history &lt;history&gt;] [-b,before &lt;context before&gt;] [-a,after &lt;context after&gt;] [-x,context &lt;nick&gt;] [-n,count &lt;count&gt;] [+ ...]&gt;
</pre>
<p>You can use -b/-before and -a/-after to display the messages before and after the result message. For example, `recall ##c -b 99` would show the last 100 messages in the ##c channel. `recall bob 50 -b 5 -a 5` would show the 50th most recent message from bob, including 5 messages before and 5 messages after that message. If you also specify -x &lt;nick&gt;, then the before and after messages will be limited to messages from the &lt;nick&gt; argument; for example, `recall -x bob -b 10` would show bob's 10 most recent messages.
</p><p>Alternatively, you can use -n/-count to display that many matches resulting from a -h/-history search; for example, `recall -h http -n 5` would show the last 5 messages containing "http". You can specify -x/-context to limit the search to a specific nick; for example, `recall -h http -x bob -n 5` would show bob's last 5 messages containing "http".
</p>
<pre>Example:
&lt;pragma-&gt; recall alice + bob
&lt;candide&gt; [20 seconds ago] &lt;alice&gt; Please put that in the right place. [8 seconds ago] &lt;bob&gt; That's what she said!
</pre>
2014-12-31 02:26:26 +01:00
<a name="Modules"></a><h3> <span class="mw-headline">Modules</span></h3>
<a name=".7B.7D"></a><h4> <span class="mw-headline">{}</span></h4>
<p>This is just an alias for the <a href="#cc" title="">cc</a> command. Can take an optional nick argument in front in order to address the output to said nick.
</p>
<pre> Example:
&lt;pragma_&gt; { puts("hello"); }
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hello
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; somebody: { puts("hi"); }
2015-10-05 11:27:40 +02:00
&lt;candide&gt; somebody: hi
2014-12-31 02:26:26 +01:00
</pre>
<a name="cc"></a><h4> <span class="mw-headline">cc</span></h4>
<p>Code compiler (and executor). This command will compile and execute user-provided code in a number of languages, and then display the compiler and/or program output.
2015-10-05 11:27:40 +02:00
</p><p>The program is executed within a gdb debugger instance, which may be interacted with via the <a href="#Using_the_GDB_debugger" title="">gdb macros described below</a> or with the gdb("command") function.
2014-12-31 02:26:26 +01:00
</p><p>The compiler and program are executed inside a virtual machine. After each run, the virtual machine is restored to a previous state. No system calls have been disallowed. You can write to and read from the filesystem, provided you do it in the same program. The network cable has been unplugged. You are free to write and test any code you like. Have fun.
</p>
<a name="Usage"></a><h5> <span class="mw-headline">Usage</span></h5>
2015-10-05 11:27:40 +02:00
<pre> Usage: cc [compiler options] [-paste] [-nomain] [-noheaders] [-lang=&lt;language&gt;] &lt;code&gt; [-input=&lt;stdin input&gt;]
2014-12-31 02:26:26 +01:00
cc &lt;run|undo|show|paste|copy|replace|prepend|append|remove|s/// [and ...]&gt;
cc &lt;diff&gt;
[nick] { &lt;same as above without the cc in front&gt; }
</pre>
<ul><li> You can pass any gcc compiler options. By default, -Wall -Wextra -std=c11 -pedantic are passed unless an option is specified.
</li><li> The -paste option will pretty-format and paste the code/output to a paste site and display the URL (useful to preserve newlines in output, and to refer to line-numbers).
2015-10-05 11:27:40 +02:00
</li><li> The -nomain flag will prevent the code from being wrapped with a main() function. This is not necessary if you're explicitly defining a main function; it's only necessary if you don't want a main function at all.
</li><li> The -noheaders flag will prevent any of the default headers from being added to the code. This is not necessary if you explicitly include any headers since doing so will override the default headers. This flag is only necessary if you want absolutely no headers whatsoever.
2014-12-31 02:26:26 +01:00
</li><li> The -input=&lt;stdin input&gt; option provides STDIN input (i.e., scanf(), getc(stdin), etc.); MUST be the last option after any code (otherwise the code will be considered to be input).
2015-10-05 11:27:40 +02:00
</li><li> The run, undo, show, replace, etc commands are part of <a href="#Interactive_Editing" title="">interactive-editing</a>.
2014-12-31 02:26:26 +01:00
</li><li> The diff command can be used to display the differences between the two most recent snippets.
</li><li> You can use { } instead of cc; the options/flags/comments must be inside the braces. Can take an optional nick argument in front in order to address the output to said nick.
</li></ul>
<a name="Supported_Languages"></a><h5> <span class="mw-headline">Supported Languages</span></h5>
2015-10-05 11:27:40 +02:00
<p>The -lang option can be used to specify an alternate compiler or language. Use -lang=? to list available languages.
2014-12-31 02:26:26 +01:00
</p>
<a name="Default_Language"></a><h5> <span class="mw-headline">Default Language</span></h5>
<p>The default language (e.g., without an explicit -lang or -std option) is C11 pedantic; which is gcc -Wall -Wextra -std=c11 -pedantic.
</p>
<a name="Disallowed_system_calls"></a><h5> <span class="mw-headline">Disallowed system calls</span></h5>
<p>None. The network cable has been unplugged. Other than that, anything goes. Have fun.
</p>
<a name="Program_termination_with_no_output"></a><h5> <span class="mw-headline">Program termination with no output</span></h5>
2015-10-05 11:27:40 +02:00
<p>If there is no output, information about the local variables and/or the last statement will be displayed.
2014-12-31 02:26:26 +01:00
</p>
<pre> &lt;pragma_&gt; cc int x = 5, y = 16; x ^= y, y ^= x, x ^= y;
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: no output: x = 16; y = 5
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;pragma_&gt; cc #include &lt;sys/utsname.h&gt; struct utsname u; uname(&amp;u);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: no output: u = {sysname = "Linux", nodename = "compiler", release = "3.2.0-8-generic", version = "#15-Ubuntu SMP Wed Jan 11 13:57:44 UTC 2012", machine = "x86_64", __domainname = "(none)"}
</pre>
<pre> &lt;pragma_&gt; cc int a = 2, b = 3; ++a + b;
&lt;candide&gt; pragma_: no output: ++a + b = 6; a = 3; b = 3
</pre>
<pre> &lt;pragma_&gt; cc sizeof (char)
&lt;candide&gt; pragma_: no output: sizeof (char) = 1
</pre>
<pre> &lt;pragma_&gt; cc 2 + 2
&lt;candide&gt; pragma_: no output: 2 + 2 = 4
2014-12-31 02:26:26 +01:00
</pre>
<a name="Abnormal_program_termination"></a><h5> <span class="mw-headline">Abnormal program termination</span></h5>
<p>If a signal is detected, the bot will display useful information.
</p><p>Example session:
</p>
<pre>&lt; pragma_&gt; ,cc char *p = 0; *p = 1;
2015-10-05 11:27:40 +02:00
&lt; candide&gt; pragma_: Program received signal 11 (SIGSEGV) at statement: *p = 1; &lt;local variables: p = 0x0&gt;
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt; pragma_&gt; ,cc void bang() { char *p = 0, s[] = "lol"; strcpy(p, s); } bang();
2015-10-05 11:27:40 +02:00
&lt; candide&gt; pragma_: Program received signal 11 (SIGSEGV) in bang () at statement: strcpy(p, s); &lt;local variables: p = 0x0, s = "lol"&gt;
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt; pragma_&gt; ,cc int a = 2 / 0;
2015-10-05 11:27:40 +02:00
&lt; candide&gt; pragma_: [In function 'main': warning: division by zero] Program received signal 8 (SIGFPE) at statement: int a = 2 / 0;
2014-12-31 02:26:26 +01:00
</pre>
<a name="C_and_C.2B.2B_Functionality"></a><h5> <span class="mw-headline">C and C++ Functionality</span></h5>
<a name="Using_the_preprocessor"></a><h5> <span class="mw-headline">Using the preprocessor</span></h5>
<a name="Default_.23includes"></a><h6> <span class="mw-headline">Default #includes</span></h6>
<p>These are the default includes for C11. To get the most up-to-date list of #includes, use the `cc paste` command.
</p>
<pre>
#define _XOPEN_SOURCE 9001
#define __USE_XOPEN
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;unistd.h&gt;
#include &lt;math.h&gt;
#include &lt;limits.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;stdint.h&gt;
#include &lt;stdbool.h&gt;
#include &lt;stddef.h&gt;
#include &lt;stdarg.h&gt;
#include &lt;stdnoreturn.h&gt;
#include &lt;stdalign.h&gt;
#include &lt;ctype.h&gt;
#include &lt;inttypes.h&gt;
#include &lt;float.h&gt;
#include &lt;errno.h&gt;
#include &lt;time.h&gt;
#include &lt;assert.h&gt;
#include &lt;complex.h&gt;
</pre>
<a name="Using_.23include"></a><h6> <span class="mw-headline">Using #include</span></h6>
<p>In C and C++, you may #include &lt;file.h&gt; one after another on the same line. The bot will automatically put them on separate lines. If you do use #include, the files you specify will replace the default includes. You do not need to append a \n after the #include.
</p>
<pre>&lt;pragma_&gt; cc #include &lt;sys/utsname.h&gt; struct utsname u; uname(&amp;u);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: &lt;no output: u = {sysname = "Linux", nodename = "compiler", release = "3.2.0-8-generic", version = "#15-Ubuntu SMP Wed Jan 11 13:57:44 UTC 2012", machine = "x86_64", __domainname = "(none)"}&gt;
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt;pragma_&gt; cc #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; void func(void) { puts("Hello, world"); } func();
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Hello, World
2014-12-31 02:26:26 +01:00
</pre>
<p>In the previous examples, only the specified includes (e.g., &lt;sys/utsname.h&gt; in the first example, &lt;stdio.h&gt; and &lt;stdlib.h&gt; in the second, will be included instead of the default includes.
</p>
<a name="Using_.23define"></a><h6> <span class="mw-headline">Using #define</span></h6>
<p>You can also #define macros; however, #defines require an explicit "\n" sequence to terminate, otherwise the remainder of the line will be part of the macro.
</p>
<pre>&lt;pragma_&gt; cc #define GREETING "Hello, World"\n puts(GREETING);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Hello, World
2014-12-31 02:26:26 +01:00
</pre>
<a name="main.28.29_Function_Unnecessary"></a><h5> <span class="mw-headline">main() Function Unnecessary</span></h5>
<p>In C and C++, if there is no main function, then a main function will created and wrapped around the appropriate bits of your code (unless the -nomain flag was specified); anything outside of any functions, excluding preprocessor stuff, will be put into this new main function. Here's an example:
</p>
<pre> &lt;pragma_&gt; cc -paste int add(int a, int b) { return a + b; } printf("4 + 6 =&nbsp;%d -- ", add(4, 6)); int add3(int a, int b, int c)
{ return add(a, b) + c; } printf("7 + 8 + 9 =&nbsp;%d", add3(7, 8, 9));
2015-10-05 11:27:40 +02:00
&lt;candide&gt; <a href="http://sprunge.us/ehRA?c" class="external free" title="http://sprunge.us/ehRA?c" rel="nofollow">http://sprunge.us/ehRA?c</a>
2014-12-31 02:26:26 +01:00
</pre>
<p>The -paste flag causes the code to be pretty-formatted and pasted with output in comments to a paste site, which displays the following:
</p>
<pre>
#define _XOPEN_SOURCE 9001
#define __USE_XOPEN
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;unistd.h&gt;
#include &lt;math.h&gt;
#include &lt;limits.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;stdint.h&gt;
#include &lt;stdbool.h&gt;
#include &lt;stddef.h&gt;
#include &lt;stdarg.h&gt;
#include &lt;stdnoreturn.h&gt;
#include &lt;stdalign.h&gt;
#include &lt;ctype.h&gt;
#include &lt;inttypes.h&gt;
#include &lt;float.h&gt;
#include &lt;errno.h&gt;
#include &lt;time.h&gt;
#include &lt;assert.h&gt;
#include &lt;complex.h&gt;
#include &lt;prelude.h&gt;
int add(int a, int b) {
return a + b;
}
int add3(int a, int b, int c) {
return add(a, b) + c;
}
int main(void) {
printf(&quot;4 + 6 =&nbsp;%d -- &quot;, add(4, 6));
printf(&quot;7 + 8 + 9 =&nbsp;%d&quot;, add3(7, 8, 9));
return 0;
}
/************* OUTPUT *************
4 + 6 = 10 -- 7 + 8 + 9 = 24
************** OUTPUT *************/
</pre>
<a name="Embedding_Newlines"></a><h5> <span class="mw-headline">Embedding Newlines</span></h5>
2015-10-05 11:27:40 +02:00
<p>Any \n character sequence appearing outside of a character literal or a string literal will be replaced with a literal newline.
2014-12-31 02:26:26 +01:00
</p>
<a name="Printing_in_binary.2Fbase2"></a><h5> <span class="mw-headline">Printing in binary/base2</span></h5>
<p>A freenode ##c regular, Wulf, has provided a printf format specifier 'b' which can be used to print values in base2.
</p>
<pre> &lt;Wulf&gt; cc printf("%b", 1234567);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 000100101101011010000111
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;Wulf&gt; cc printf("%#'b", 1234567);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 0001.0010.1101.0110.1000.0111
2014-12-31 02:26:26 +01:00
</pre>
<a name="Using_the_GDB_debugger"></a><h5> <span class="mw-headline">Using the GDB debugger</span></h5>
<p>The program is executed within a gdb debugger instance, which may be interacted with via the following gdb macros.
</p>
<a name="print"></a><h6> <span class="mw-headline">print</span></h6>
<p>The print() macro prints the values of expressions. Useful for printing out structures and arrays.
</p>
<pre>&lt;pragma_&gt; cc int a[] = { 1, 2, 3 }; print(a);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: a = {1, 2, 3}
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt;pragma_&gt; cc #include &lt;sys/utsname.h&gt; struct utsname u; uname(&amp;u); print(u);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: u = {sysname = "Linux", nodename = "compiler", release = "3.2.0-8-generic", version = "#15-Ubuntu SMP Wed Jan 11 13:57:44 UTC 2012", machine = "x86_64", __domainname = "(none)"}
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt;pragma_&gt; cc print(sizeof(int));
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: sizeof(int) = 4
2014-12-31 02:26:26 +01:00
</pre>
<pre>&lt;pragma_&gt; cc print(2+2);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: 2 + 2 = 4
2014-12-31 02:26:26 +01:00
</pre>
<a name="ptype"></a><h6> <span class="mw-headline">ptype</span></h6>
<p>The ptype() macro prints the types of expressions.
</p>
<pre> &lt;pragma_&gt; cc int *a[] = {0}; ptype(a); ptype(a[0]); ptype(*a[0]);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: a = int *[1] a[0] = int * *a[0] = int
2014-12-31 02:26:26 +01:00
</pre>
<a name="watch"></a><h6> <span class="mw-headline">watch</span></h6>
<p>The watch() macro watches a variable and displays its value when it changes.
</p>
2015-10-05 11:27:40 +02:00
<pre>&lt;pragma_&gt; cc int n = 0, last = 1; watch(n); while(n &lt;= 144) { n += last; last = n - last; } /* fibonacci */
&lt;candide&gt; pragma_: n = 1 n = 2 n = 3 n = 5 n = 8 n = 13 n = 21 n = 34 n = 55 n = 89 n = 144
2014-12-31 02:26:26 +01:00
</pre>
<a name="trace"></a><h6> <span class="mw-headline">trace</span></h6>
<p>The trace() macro traces a function's calls, displaying passed and returned values.
</p>
<pre> &lt;pragma_&gt; ,cc trace(foo); char *foo(int n) { puts("Hello, world"); return "Good-bye, world"; } foo(42);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: entered [1] foo (n=42) Hello, world leaving [1] foo (n=42), returned 0x401006 "Good-bye, world"
2014-12-31 02:26:26 +01:00
</pre>
<a name="gdb"></a><h6> <span class="mw-headline">gdb</span></h6>
<p>The gdb() function takes a string argument which it passes to the gdb debugger and then displays the output if any.
</p>
<pre> &lt;pragma_&gt; ,cc gdb("info macro NULL");
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Defined at /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:402 #define NULL ((void *)0)
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;pragma_&gt; ,cc void foo() { gdb("info frame"); } foo();
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Stack level 1, frame at 0x7fffffffe660: rip = 0x400e28 in foo (); saved rip 0x400e43 called by frame at 0x7fffffffe680, caller of frame at 0x7fffffffe650 source language c. Arglist at 0x7fffffffe650, args: Locals at 0x7fffffffe650, Previous frame's sp is 0x7fffffffe660 Saved registers: rbp at 0x7fffffffe650, rip at 0x7fffffffe658
2014-12-31 02:26:26 +01:00
</pre>
<a name="Interactive_Editing"></a><h5> <span class="mw-headline">Interactive Editing</span></h5>
<p>The <a href="#cc" title="">cc</a> command supports interactive-editing. The general syntax is: cc [command].
2015-10-05 11:27:40 +02:00
</p><p>Each cc snippet is saved in a buffer which is named after the channel or nick it was used in. You can use <a href="#show" title="">show</a> or <a href="#diff" title="">diff</a> with a buffer argument to view that buffer; otherwise you can use the <a href="#copy" title="">copy</a> command to copy the most recent snippet of another buffer into the current buffer and optionally chain it with another command -- for example, to copy the ##c buffer (e.g., from a private message or a different channel) and paste it: <i>cc copy ##c and paste</i>.
2014-12-31 02:26:26 +01:00
</p><p>The commands are: <a href="#copy" title="">copy</a>, <a href="#show" title="">show</a>, <a href="#diff" title="">diff</a>, <a href="#paste" title="">paste</a>, <a href="#run" title="">run</a>, <a href="#undo" title="">undo</a>, <a href="#s.2F.2F" title="">s//</a>, <a href="#replace" title="">replace</a>, <a href="#prepend" title="">prepend</a>, <a href="#append" title="">append</a>, and <a href="#remove" title="">remove</a>. Most of the commands may be chained together by separating them with whitespace or "and".
</p><p>The commands are described in more detail below:
</p>
<a name="copy"></a><h6> <span class="mw-headline">copy</span></h6>
2015-10-05 11:27:40 +02:00
<p>To copy the most recent snippet from another buffer (e.g., to copy another channel's or private message's buffer to your own private message or channel), use the <b>copy</b> command. Other commands can optionally be chained after this command.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: cc copy &lt;buffer&gt; [and ...]
</pre>
<a name="show"></a><h6> <span class="mw-headline">show</span></h6>
<p>To show the latest code in the buffer, use the <b>show</b> command. This command can take an optional buffer argument.
</p>
<pre> &lt;pragma_&gt; cc show
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: printf("Hello, world!");
2014-12-31 02:26:26 +01:00
</pre>
<p>This command is stand-alone and cannot be chained with other interactive-editing commands.
</p>
<a name="diff"></a><h6> <span class="mw-headline">diff</span></h6>
<p>To see the differences between the two most recent snippets, use the <b>diff</b> command. This command can take an optional buffer argument.
</p>
<pre> &lt;pragma_&gt; cc diff
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma: printf("&lt;replaced `Hello` with `Good-bye`&gt;, &lt;replaced `world` with `void`&gt;");
2014-12-31 02:26:26 +01:00
</pre>
<p>This command is stand-alone and cannot be chained with other interactive-editing commands.
</p>
<a name="paste"></a><h6> <span class="mw-headline">paste</span></h6>
<p>To paste the full source of the latest code in the buffer as the compiler sees it, use the <b>paste</b> command:
</p>
<pre> &lt;pragma_&gt; cc paste
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: <a href="http://some.random.paste-site.com/paste/results" class="external free" title="http://some.random.paste-site.com/paste/results" rel="nofollow">http://some.random.paste-site.com/paste/results</a>
2014-12-31 02:26:26 +01:00
</pre>
<p>This command is stand-alone and cannot be chained with other interactive-editing commands.
</p>
<a name="run"></a><h6> <span class="mw-headline">run</span></h6>
<p>To attempt to compile and execute the latest code in the buffer, use the <b>run</b> command:
</p>
<pre> &lt;pragma_&gt; cc run
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Hello, world!
2014-12-31 02:26:26 +01:00
</pre>
<p>This command is stand-alone and cannot be chained with other interactive-editing commands.
</p>
<a name="undo"></a><h6> <span class="mw-headline">undo</span></h6>
<p>To undo any changes, use <b>undo</b>. The <b>undo</b> command must be the first command before any subsequent commands.
</p>
<a name="s.2F.2F"></a><h6> <span class="mw-headline">s//</span></h6>
<p>To change the latest code in the buffer, use the <b>s/regex/substitution/[gi]</b> pattern.
</p>
<pre> &lt;pragma_&gt; cc s/Hello/Good-bye/ and s/world/void/
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: Good-bye, void!
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; cc show
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: printf("Good-bye, void!");
2014-12-31 02:26:26 +01:00
</pre>
<a name="replace"></a><h6> <span class="mw-headline">replace</span></h6>
<p>Alternatively, you may use the <b>replace</b> command. The usage is (note the required single-quotes):
</p>
<pre> cc replace [all, first, second, ..., tenth, last] 'from' with 'to'
</pre>
<a name="prepend"></a><h6> <span class="mw-headline">prepend</span></h6>
<p>Text may be prepended with the <b>prepend</b> command:
</p>
<pre> cc prepend 'text'
</pre>
<a name="append"></a><h6> <span class="mw-headline">append</span></h6>
<p>Text may be appended with the <b>append</b> command:
</p>
<pre> cc append 'text'
</pre>
<a name="remove"></a><h6> <span class="mw-headline">remove</span></h6>
<p>Text may be deleted with the <b>remove</b> command:
</p>
<pre> cc remove [all, first, second, ..., tenth, last] 'text'
</pre>
<a name="Some_Examples"></a><h5> <span class="mw-headline">Some Examples</span></h5>
<pre> Examples:
</pre>
<pre> &lt; pragma_&gt; cc int fib2(int n, int p0, int p1) { return n == 1&nbsp;? p1&nbsp;: fib2(n - 1, p1, p0 + p1); }
int fib(int n) { return n == 0&nbsp;? 0&nbsp;: fib2(n, 0, 1); } for(int i = 0; i &lt; 21; i++) printf("%d ", fib(i));
2015-10-05 11:27:40 +02:00
&lt; candide&gt; pragma_: 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt; pragma_&gt; cc int i = 0, last = 1; while(i &lt;= 7000) { printf("%d ", i); i += last; last = i - last; }
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;Icewing&gt; cc int n=0, f[2]={0,1}; while(n&lt;20) printf("%d ",f[++n&amp;1]=f[0]+f[1]); // based on cehteh
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Icewing: 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;3monkeys&gt; cc @p=(0,1); until($#p&gt;20) { print"$p[-2]\n"; push @p, $p[-2] + $p[-1] } -lang=Perl
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 3monkeys: 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;spiewak&gt; cc -lang=Ruby p,c=0,1; 20.times{p p; c=p+p=c}
2015-10-05 11:27:40 +02:00
&lt;candide&gt; spiewak: 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt;Jafet&gt; cc main = print $ take 20 $ let fibs = 0&nbsp;: scanl (+) 1 fibs in fibs; -lang=Haskell
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Jafet: [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181]
2014-12-31 02:26:26 +01:00
</pre>
<a name="english"></a><h4> <span class="mw-headline">english</span></h4>
2015-10-05 11:27:40 +02:00
<p>Converts C11 code into English sentences.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: english &lt;C snippet&gt;
</pre>
<pre> Examples:
&lt;pragma_&gt; english char (*a)[10]; char *b[10];
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Let a be a pointer to an array of length 10 of type char. Let b be an array of length 10 of type pointer to char.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; english for(;;);
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Repeatedly compute nothing.
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; english typedef char Batman; char Bruce_Wayne; char superhero = (Batman) Bruce_Wayne;
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Let Batman be another name for a character. Let Bruce_Wayne be a character. Let superhero be a character, with value being Bruce_Wayne cast to a Batman.
2014-12-31 02:26:26 +01:00
</pre>
<a name="expand"></a><h4> <span class="mw-headline">expand</span></h4>
<p>Expands macros in C code and displays the resulting code. Macros must be terminated by a \n sequence. You may #include headers to expand macros defined within.
</p>
<pre> Usage: expand &lt;C snippet&gt;
</pre>
<pre> Example:
&lt;pragma_&gt; expand #define WHILE while ( \n #define DO ) { \n #define WEND } \n int i = 5; WHILE --i DO puts("hi"); WEND
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: int i = 5; while ( --i ) { puts("hi"); }
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; expand #include &lt;stdlib.h&gt; NULL
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: ((void *)0)
2014-12-31 02:26:26 +01:00
</pre>
<a name="prec"></a><h4> <span class="mw-headline">prec</span></h4>
<a name="paren"></a><h4> <span class="mw-headline">paren</span></h4>
<p>Shows operator precedence in C99 expressions by adding parentheses.
</p>
<pre> Usage: prec &lt;expression&gt;
paren &lt;expression&gt;
</pre>
<pre> Examples:
&lt;pragma_&gt; prec *a++
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: *(a++)
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; prec a = b &amp; c
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: a = (b &amp; c)
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; prec token = strtok(s, d)&nbsp;!= NULL
2015-10-05 11:27:40 +02:00
&lt;candide&gt; pragma_: token = (strtok(s, d)&nbsp;!= NULL)
2014-12-31 02:26:26 +01:00
</pre>
<a name="faq"></a><h4> <span class="mw-headline">faq</span></h4>
<p>Displays questions from the <a href="http://http://www.eskimo.com/~scs/C-faq/top.html" class="external text" title="http://http://www.eskimo.com/~scs/C-faq/top.html" rel="nofollow">comp.lang.c faq</a>. Some queries may return more than one result; if this happens, you may use the 'match #' optional argument to specify the match you'd like to view.
</p>
<pre> Usage: faq [match #] &lt;search regex&gt;
Examples:
&lt;pragma_&gt; faq cast malloc
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 2 results, displaying #1: 7. Memory Allocation, 7.6 Why am
2014-12-31 02:26:26 +01:00
I getting ``warning: assignment of pointer from integer
lacks a cast<i> for calls to malloc?&nbsp;: </i>
<a href="http://www.eskimo.com/~scs/C-faq/q7.6.html" class="external free" title="http://www.eskimo.com/~scs/C-faq/q7.6.html" rel="nofollow">http://www.eskimo.com/~scs/C-faq/q7.6.html</a>
&lt;pragma_&gt; faq 2 cast malloc
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 2 results, displaying #2: 7. Memory Allocation, 7.7 Why
2014-12-31 02:26:26 +01:00
does some code carefully cast the values returned by
malloc to the pointer type being allocated?&nbsp;:
<a href="http://www.eskimo.com/~scs/C-faq/q7.7.html" class="external free" title="http://www.eskimo.com/~scs/C-faq/q7.7.html" rel="nofollow">http://www.eskimo.com/~scs/C-faq/q7.7.html</a>
&lt;pragma_&gt; faq ^6.4
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 6. Arrays and Pointers, 6.4 Why are array and pointer
2014-12-31 02:26:26 +01:00
declarations interchangeable as function formal
parameters?&nbsp;: <a href="http://www.eskimo.com/~scs/C-faq/q6.4.html" class="external free" title="http://www.eskimo.com/~scs/C-faq/q6.4.html" rel="nofollow">http://www.eskimo.com/~scs/C-faq/q6.4.html</a>
</pre>
<a name="cfact"></a><h4> <span class="mw-headline">cfact</span></h4>
<p>Displays a random C fact. You can specify a search text to limit the random set to those containing that text.
</p>
<pre> Usage: cfact [search text]
</pre>
<a name="cjeopardy"></a><h4> <span class="mw-headline">cjeopardy</span></h4>
<p>Displays a random C Jeopardy question. You can specify a search text to limit the random set to those containing that text. Answer the questions with `what is ...?`
2015-10-05 11:27:40 +02:00
Can be used to skip the current question.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: cjeopardy [search text]
</pre>
<a name="hint"></a><h5> <span class="mw-headline">hint</span></h5>
<p>Displays a hint for the current C Jeopardy question. Each subsequent hint request reveals more of the answer.
</p>
2015-10-05 11:27:40 +02:00
<a name="what"></a><h5> <span class="mw-headline">what</span></h5>
<a name="w"></a><h5> <span class="mw-headline">w</span></h5>
<p>Answers a C Jeopardy question. `w` may be used as an alternative short-hand.
</p>
<pre> Usage: what is &lt;answer&gt;?
Usage: w &lt;answer&gt;
</pre>
<a name="score"></a><h5> <span class="mw-headline">score</span></h5>
<p>Shows the personal C Jeopardy statistics for a player. If used without any arguments, it shows your own statistics.
</p>
<pre> Usage: score [player name]
</pre>
<a name="rank"></a><h5> <span class="mw-headline">rank</span></h5>
<p>Shows ranking for various C Jeopardy statistics, or your personal rankings in each of the statistics. If used without any arguments, it shows the available keywords for which statistics to rank.
</p>
<pre> Usage: rank [keyword or player name]
</pre>
<a name="reset"></a><h5> <span class="mw-headline">reset</span></h5>
<p>Resets your personal C Jeopardy statistics for the current session. Your life-time records will still be retained.
</p>
<a name="qstats"></a><h5> <span class="mw-headline">qstats</span></h5>
<p>Shows statistics specific to a C Jeopardy question. Can also rank questions by a specific statistic.
</p>
<pre> Usage: qstats [question id]
Usage: qstats rank [keyword or question id]
</pre>
<a name="qshow"></a><h5> <span class="mw-headline">qshow</span></h5>
<p>Displays a specific C Jeopardy question without making it the current question. Useful for seeing which question belongs to a question id; .e.g. with qstats.
</p>
<pre> Usage: qshow &lt;question id&gt;
</pre>
2014-12-31 02:26:26 +01:00
<a name="c99std"></a><h4> <span class="mw-headline">c99std</span></h4>
<p>Searches ISO/IEC 9899:TC3 (WG14/N1256), also known as the C99 draft standard. <a href="http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf" class="external free" title="http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf" rel="nofollow">http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf</a>
</p>
<pre> Usage: c99std [-list] [-n#] [section] [search regex]
If specified, 'section' must be in the form of X.YpZ where X and Y are section/chapter and, optionally, pZ is paragraph.
To display a specific section and all its paragraphs, specify just the 'section' without pZ.
To display just a specific paragraph, specify the full 'section' identifier (X.YpZ).
You may use -n # to skip to the #th match.
To list only the section numbers containing 'search text', add -list.
If both 'section' and 'search regex' are specified, then the search space will be within the specified section identifier.
</pre>
<pre> Examples:
</pre>
<pre> &lt; pragma_&gt; c99std pointer value
2015-10-05 11:27:40 +02:00
&lt; candide&gt; Displaying #1 of 64 matches: 5.1.2.2.1p1: [Program startup] If they are declared, the parameters to the
2014-12-31 02:26:26 +01:00
main function shall obey the following constraints: -- The value of argc shall be nonnegative. -- argv[argc]
shall be a null pointer. -- If the value of argc is greater than zero, the array members argv[0] through
argv[argc-1] inclusive shall contain pointers to st... truncated; see <a href="http://codepad.org/f2DULaGQ" class="external free" title="http://codepad.org/f2DULaGQ" rel="nofollow">http://codepad.org/f2DULaGQ</a> for full text.
</pre>
<pre> &lt; pragma_&gt; c99std pointer value -list
2015-10-05 11:27:40 +02:00
&lt; candide&gt; Sections containing 'pointer value': 5.1.2.2.1p2, 5.1.2.3p9, 6.2.5p20, 6.2.5p27, 6.3.2.1p3, 6.3.2.1p4,
2014-12-31 02:26:26 +01:00
6.3.2.3p2, 6.3.2.3p6, 6.5.2.1p3, 6.5.2.2p5, 6.5.2.2p6, 6.5.2.4p1, 6.5.2.4p2, 6.5.3.1p1, 6.5.3.2p3, 6.5.3.2p4,
6.5.3.3p5, 6.5.3.4p5, 6.5.6p8, 6.5.6p9, 6.5.8p5, 6.5.15p6, 6.6p7, 6.6p9, 6.7.2.2p5, 6.7.2.3p7, 6.7.2.3p3,
6.7.5.1p3, 6.7.5.2p7, 7.1.1p1, 7.1.1p4, 7.1.4p1, 7... truncated; see <a href="http://codepad.org/qQlnJYJk" class="external free" title="http://codepad.org/qQlnJYJk" rel="nofollow">http://codepad.org/qQlnJYJk</a> for full text.
</pre>
<pre> &lt; pragma_&gt; Hmm, how about just section 6.3?
</pre>
<pre> &lt; pragma_&gt; c99std pointer value 6.3
2015-10-05 11:27:40 +02:00
&lt; candide&gt; Displaying #1 of 4 matches: 6.3.2.1p1: [Lvalues, arrays, and function designators] Except when it is the operand
2014-12-31 02:26:26 +01:00
of the sizeof operator or the unary &amp; operator, or is a string literal used to initialize an array, an expression
that has type ``array of type is converted to an expression with type ``pointer to type that points to the
initial element of the array ob... truncated; see <a href="http://codepad.org/mf1RNnr2" class="external free" title="http://codepad.org/mf1RNnr2" rel="nofollow">http://codepad.org/mf1RNnr2</a> for full text.
</pre>
<pre> &lt; pragma_&gt; c99std pointer value 6.3 -list
2015-10-05 11:27:40 +02:00
&lt; candide&gt; Sections containing 'pointer value': 6.3.2.1p3, 6.3.2.1p4, 6.3.2.3p2, 6.3.2.3p6
2014-12-31 02:26:26 +01:00
</pre>
<pre> &lt; pragma_&gt; c99std pointer value 6.3 -n3
2015-10-05 11:27:40 +02:00
&lt; candide&gt; Displaying #3 of 4 matches: 6.3.2.3p1: [Pointers] For any qualifier q, a pointer to a non-q-qualified type may be
2014-12-31 02:26:26 +01:00
converted to a pointer to the q-qualified version of the type; the values stored in the original and converted
pointers shall compare equal.
</pre>
<a name="c11std"></a><h4> <span class="mw-headline">c11std</span></h4>
<p>Searches ISO/IEC 9811:201X (WG14/N1256), also known as the C11 draft standard. <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf" class="external free" title="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf" rel="nofollow">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf</a>
</p><p>Usage is identical to c99std.
</p>
<a name="man"></a><h4> <span class="mw-headline">man</span></h4>
<p>Displays manpage summaries and/or C related tidbits (headers, prototypes, specifications), as well as a link to the FreeBSD manpage.
</p>
<pre>Usage: man [section] query
Samples:
&lt;pragma_&gt; man fork
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Includes: sys/types.h, unistd.h - pid_t fork(void); - SVr4,
2014-12-31 02:26:26 +01:00
SVID, POSIX, X/OPEN, BSD - fork creates a child process that
differs from the parent process only in its PID and PPID, and
in the fact that resource utilizations are set to 0 -
<a href="http://www.iso-9899.info/man?fork" class="external free" title="http://www.iso-9899.info/man?fork" rel="nofollow">http://www.iso-9899.info/man?fork</a>
&lt;pragma_&gt; man atexit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Includes: stdlib.h - int atexit(void (*function)(void)); -
2014-12-31 02:26:26 +01:00
SVID 3, BSD 4.3, ISO 9899 - atexit () function registers the
given function to be called at normal program termination,
whether via exit(3) or via return from the program's main -
<a href="http://www.iso-9899.info/man?atexit" class="external free" title="http://www.iso-9899.info/man?atexit" rel="nofollow">http://www.iso-9899.info/man?atexit</a>
&lt;pragma_&gt; man getcwd
2015-10-05 11:27:40 +02:00
&lt;candide&gt; Includes: unistd.h - char *getcwd(char *buf, size_t size); -
2014-12-31 02:26:26 +01:00
POSIX.1 - getcwd () function copies an absolute pathname of
the current working directory to the array pointed to by buf,
which is of length size - <a href="http://www.iso-9899.info/man?getcwd" class="external free" title="http://www.iso-9899.info/man?getcwd" rel="nofollow">http://www.iso-9899.info/man?getcwd</a>
</pre>
<a name="google"></a><h4> <span class="mw-headline">google</span></h4>
<p>Displays google results for a query.
</p>
<pre>Usage: google [number of results] query
Samples:
&lt;pragma_&gt; google brian kernighan
2015-10-05 11:27:40 +02:00
&lt;candide&gt; brian kernighan (115,000): Brian Kernighan's Home Page:
2014-12-31 02:26:26 +01:00
(<a href="http://www.cs.princeton.edu/~bwk/" class="external free" title="http://www.cs.princeton.edu/~bwk/" rel="nofollow">http://www.cs.princeton.edu/~bwk/</a>)
&lt;pragma_&gt; google 3 brian kernighan
2015-10-05 11:27:40 +02:00
&lt;candide&gt; brian kernighan (115,000): Brian Kernighan's Home Page:
2014-12-31 02:26:26 +01:00
(<a href="http://www.cs.princeton.edu/~bwk/" class="external free" title="http://www.cs.princeton.edu/~bwk/" rel="nofollow">http://www.cs.princeton.edu/~bwk/</a>), An Interview with Brian
Kernighan: (<a href="http://www-2.cs.cmu.edu/~mihaib/kernighan-interview/" class="external free" title="http://www-2.cs.cmu.edu/~mihaib/kernighan-interview/" rel="nofollow">http://www-2.cs.cmu.edu/~mihaib/kernighan-interview/</a>),
Interview with Brian Kernighan | Linux Journal:
(<a href="http://www.linuxjournal.com/article.php?sid=7035" class="external free" title="http://www.linuxjournal.com/article.php?sid=7035" rel="nofollow">http://www.linuxjournal.com/article.php?sid=7035</a>), Brian W.
Kernighan: (<a href="http://www.lysator.liu.se/c/bwk/" class="external free" title="http://www.lysator.liu.se/c/bwk/" rel="nofollow">http://www.lysator.liu.se/c/bwk/</a>) ,Brian W.
Kernighan: Programming in C: A Tutorial:
(<a href="http://www.lysator.liu.se/c/bwk-tutor.html" class="external free" title="http://www.lysator.liu.se/c/bwk-tutor.html" rel="nofollow">http://www.lysator.liu.se/c/bwk-tutor.html</a>)
</pre>
<a name="define"></a><h4> <span class="mw-headline">define</span></h4>
<a name="dict"></a><h4> <span class="mw-headline">dict</span></h4>
<p>Displays dictionary defintions from <a href="http://dict.org" class="external free" title="http://dict.org" rel="nofollow">http://dict.org</a> using DICT protocol.
2015-10-05 11:27:40 +02:00
</p><p>Databases for the -d option are listed here: <a href="http://www.iso-9899.info/candide/dict_databases.txt" class="external free" title="http://www.iso-9899.info/candide/dict_databases.txt" rel="nofollow">http://www.iso-9899.info/candide/dict_databases.txt</a> -- Note that there may be several commands aliased to one of these databases; for example, the `foldoc` command is an alias to `dict -d foldoc`.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: dict [-d database] [-n start from definition number] [-t first letter of word class type (n]oun, v]erb, etc)]
[-search &lt;regex&gt; for definitions matching &lt;regex&gt;] &lt;word&gt;
</pre>
<pre> Examples:
</pre>
<pre> &lt;pragma_&gt; dict hit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hit: n: 1) (baseball) a successful stroke in an athletic contest (especially in baseball);
2014-12-31 02:26:26 +01:00
"he came all the way around on Williams' hit", 2) the act of contacting one thing with another;
"repeated hitting raised a large bruise"; "after three misses she finally got a hit" [syn: hitting,
striking], 3) a conspicuous success; "that song was his first hit and marked the beginning of his
career"; "that new Broadway show is a real smasher"
</pre>
<pre> &lt;pragma_&gt; dict -n 4 hit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hit: n: 4) (physics) an brief event in which two or more bodies come together; "the collision of the
2014-12-31 02:26:26 +01:00
particles resulted in an exchange of energy and a change of direction" [syn: collision], 5) a dose
of a narcotic drug, 6) a murder carried out by an underworld syndicate; "it has all the earmarks of
a Mafia hit", 7) a connection made via the internet to another website; "WordNet gets many hits from
users worldwide"
</pre>
<pre> &lt;pragma_&gt; dict -t v hit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hit: v: 1) cause to move by striking; "hit a ball", 2) hit against; come into sudden contact with;
2014-12-31 02:26:26 +01:00
"The car hit a tree"; "He struck the table with his elbow" [syn: strike, impinge on, run into,
collide with] [ant: miss], 3) affect or afflict suddenly, usually adversely; "We were hit by really
bad weather"; "He was stricken with cancer when he was still a teenager"; "The earthquake struck at
midnight" [syn: strike], 4) deal a blow to
</pre>
<pre> &lt;pragma_&gt; dict -search ball hit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hit: n: 1) (baseball) a successful stroke in an athletic contest (especially in baseball); "he came all
2014-12-31 02:26:26 +01:00
the way around on Williams' hit", v: 1) cause to move by striking; "hit a ball"
</pre>
<pre> &lt;pragma_&gt; dict -d eng-fra hit
2015-10-05 11:27:40 +02:00
&lt;candide&gt; hit: 1) [hit] battre, frapper, heurter frapper, heurter atteindre, frapper, parvenir, saisir
2014-12-31 02:26:26 +01:00
</pre>
<a name="foldoc"></a><h4> <span class="mw-headline">foldoc</span></h4>
<p>This is just an alias for `dict -d foldoc`.
</p>
<a name="vera"></a><h4> <span class="mw-headline">vera</span></h4>
<p>This is just an alias for `dict -d vera`.
</p><p><br />
</p>
<a name="udict"></a><h4> <span class="mw-headline">udict</span></h4>
<p>Displays dictionary definitions from <a href="http://urbandictionary.com" class="external free" title="http://urbandictionary.com" rel="nofollow">http://urbandictionary.com</a>.
</p>
<pre>Usage: udict query
</pre>
<a name="wdict"></a><h4> <span class="mw-headline">wdict</span></h4>
<p>Displays Wikipedia article abstracts (first paragraph). Note: case-sensitive and very picky.
</p>
<pre>Usage: wdict query
</pre>
<a name="acronym"></a><h4> <span class="mw-headline">acronym</span></h4>
<p>Displays expanded acronyms.
</p>
<pre>Usage: acronym query
Samples:
&lt;pragma_&gt; acronym posix
2015-10-05 11:27:40 +02:00
&lt;candide&gt; posix (3 entries): Portable Operating System for
2014-12-31 02:26:26 +01:00
Information Exchange, Portable Operating System Interface
Extensions (IBM), Portable Operating System Interface for
Unix
&lt;pragma_&gt; acronym linux
2015-10-05 11:27:40 +02:00
&lt;candide&gt; linux (1 entries): Linux Is Not UniX
2014-12-31 02:26:26 +01:00
</pre>
<a name="math"></a><h4> <span class="mw-headline">math</span></h4>
<p>Evaluate calculations.
</p>
<pre>Usage: math &lt;expression&gt;
Example:
&lt;pragma_&gt; math 5 + 5
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 5 + 5 = 10
2014-12-31 02:26:26 +01:00
</pre>
<a name="compliment"></a><h4> <span class="mw-headline">compliment</span></h4>
<p>Displays a random Markov-chain compliment/insult.
</p>
<pre>Usage: compliment [nick]
</pre>
<a name="insult"></a><h4> <span class="mw-headline">insult</span></h4>
<p>Displays a random insult.
</p>
<pre>Usage: insult [nick]
</pre>
<a name="excuse"></a><h4> <span class="mw-headline">excuse</span></h4>
<p>Displays a random excuse.
</p>
<pre>Usage: excuse [nick]
</pre>
<a name="horoscope"></a><h4> <span class="mw-headline">horoscope</span></h4>
<p>Displays a horoscope for a Zodiac sign (google this if you don't know your sign).
</p>
<pre>Usage: horoscope &lt;sign&gt;
</pre>
<a name="horrorscope"></a><h4> <span class="mw-headline">horrorscope</span></h4>
<p>Displays a horrorscope for a Zodiac sign.
</p>
<pre>Usage: horrorscope &lt;sign&gt;
</pre>
<a name="quote"></a><h4> <span class="mw-headline">quote</span></h4>
<p>Displays quotes from a popular quotation database. If you use `quote` without arguments, it returns a random quote; if you use it
with an argument, it searches for quotes containing that text; if you add --author &lt;name&gt; at the end, it searches for a quote by
that author; if you specify text and --author, it searches for quotes by that author, containing that text.
</p>
<pre>Usage: quote [search text] [--author &lt;author name&gt;]
Samples:
&lt;pragma_&gt; quote
2015-10-05 11:27:40 +02:00
&lt;candide&gt; "Each success only buys an admission ticket to a more difficult problem." -- Henry Kissinger (1923 - ).
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; quote --author lao tzu
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 41 matching quotes found. "A journey of a thousand miles begins with a single step." -- Lao-tzu (604 BC - 531 BC).
2014-12-31 02:26:26 +01:00
&lt;pragma_&gt; quote butterfly
2015-10-05 11:27:40 +02:00
&lt;candide&gt; 11 matching quotes found. "A chinese philosopher once had a dream that he was a butterfly. From that day on, he
2014-12-31 02:26:26 +01:00
was never quite certain that he was not a butterfly, dreaming that he was a man." -- Unknown.
</pre>
<a name="Informative"></a><h3> <span class="mw-headline">Informative</span></h3>
<a name="list"></a><h4> <span class="mw-headline">list</span></h4>
<p>Lists information about specified argument
</p>
2015-10-05 11:27:40 +02:00
<pre>Usage: list &lt;modules|factoids|commands|admins&gt;
2014-12-31 02:26:26 +01:00
</pre>
<a name="info"></a><h4> <span class="mw-headline">info</span></h4>
<p>Shows detailed information about a module or a factoid
</p>
2015-10-05 11:27:40 +02:00
<pre> Usage: info &lt;channel&gt; &lt;keyword&gt;
2014-12-31 02:26:26 +01:00
</pre>
<a name="version"></a><h4> <span class="mw-headline">version</span></h4>
<p>Shows version information
</p>
<a name="source"></a><h4> <span class="mw-headline">source</span></h4>
2015-10-05 11:27:40 +02:00
<p>Shows candide's source information.
2014-12-31 02:26:26 +01:00
</p>
<a name="help"></a><h4> <span class="mw-headline">help</span></h4>
<p>Shows link to this page.
</p>
<a name="Administrative"></a><h3> <span class="mw-headline">Administrative</span></h3>
<a name="login"></a><h4> <span class="mw-headline">login</span></h4>
2015-10-05 11:27:40 +02:00
<p>You cannot use any of the admin commands unless you login first.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage: login &lt;password&gt;
</pre>
2015-10-05 11:27:40 +02:00
<p>Note that login requires that your hostmask matches candide's records.
2014-12-31 02:26:26 +01:00
</p>
<a name="logout"></a><h4> <span class="mw-headline">logout</span></h4>
2015-10-05 11:27:40 +02:00
<p>Logs out of candide.
</p>
<a name="Admin_Management"></a><h4> <span class="mw-headline">Admin Management</span></h4>
<a name="adminadd"></a><h5> <span class="mw-headline">adminadd</span></h5>
<p>Adds a bot admin.
</p>
<pre>Usage: adminadd &lt;name&gt; &lt;channel&gt; &lt;hostmask&gt; &lt;level&gt; &lt;password&gt;
</pre>
<ul><li><i>name</i>: a unique name to identify this account (usually the nick of the admin, but can be any identifier).
</li></ul>
<ul><li><i>channel</i>: which channel the admin can administrate; use "global" for all channels. This field cannot be changed without removing and re-adding the admin.
</li></ul>
<ul><li><i>hostmask</i>: a regular expression of what hostmask the admin is recognized/allowed to login from (e.g., somenick!.*@.*.somedomain.com or .*@unaffiliated/someuser). This field cannot be changed without removing and re-adding the admin.
</li></ul>
<ul><li><i>level</i>: an integer representing their level of privileges. See <a href="#Admin_Levels" title="">admin-levels</a>.
</li></ul>
<ul><li><i>password</i>: the password the admin will use to login (from /msg!). A password is not required if the `stayloggedin` meta-data is set for the admin; however, a dummy password still needs to be set.
</li></ul>
<a name="Admin_Levels"></a><h6> <span class="mw-headline">Admin Levels</span></h6>
<p>This is a list of admin commands allowed by each admin level. Higher level admins have access to all lower level admin commands.
</p>
<ul><li> 10: whitelist, blacklist, chanlist, ban, unban, mute, unmute, kick, ignore, unignore
</li><li> 40: chanset, chanunset, chanadd, chanrem, join, part
</li><li> 60: adminadd, adminrem, adminset, adminunset, akalink, akaunlink, regadd, regrem, regset, regunset, regchange
</li><li> 90: sl, load, unload, export, rebuildaliases, refresh, die
</li></ul>
<a name="adminrem"></a><h5> <span class="mw-headline">adminrem</span></h5>
<p>Removes a bot admin. You can use the name field or the hostmask field that was set via adminadd.
</p>
<pre>Usage: adminrem &lt;channel&gt; &lt;name/hostmask&gt;
</pre>
<a name="adminset"></a><h5> <span class="mw-headline">adminset</span></h5>
<p>Sets meta-data for an admin account. You can use the name field or the hostmask field that was set via adminadd. See also: <a href="#Admin_Metadata_List" title="">admin metadata list</a>.
</p><p>If `key` is omitted, it will list all the keys and values that are set. If `value` is omitted, it will show the value for `key`.
</p>
<pre>Usage: adminset &lt;channel&gt; &lt;name/hostmask&gt; [&lt;key&gt; [value]]
</pre>
<a name="Admin_Metadata_List"></a><h6> <span class="mw-headline">Admin Metadata List</span></h6>
<p>This is a list of recognized meta-data keys for admin accounts.
</p>
<ul><li> name: A unique name identifying this admin account.
</li><li> level: The privilege level of the admin. See <a href="#Admin_Levels" title="">admin levels</a>.
</li><li> password: The password for this admin account.
</li><li> loggedin: Whether the admin is logged in or not.
</li><li> stayloggedin: Do not automatically log the admin out when they part/quit.
</li></ul>
<a name="adminunset"></a><h5> <span class="mw-headline">adminunset</span></h5>
<p>Deletes a meta-data key from an admin account. You can use the name field or the hostmask field that was set via adminadd.
</p>
<pre>Usage: adminunset &lt;channel&gt; &lt;name/hostmask&gt; &lt;key&gt;
</pre>
<a name="Channel_Management"></a><h4> <span class="mw-headline">Channel Management</span></h4>
<a name="chanadd"></a><h5> <span class="mw-headline">chanadd</span></h5>
<p>chanadd adds a channel to candide's list of channels to auto-join and manage.
</p>
<pre>Usage: chanadd &lt;channel&gt;
</pre>
<a name="chanrem"></a><h5> <span class="mw-headline">chanrem</span></h5>
<p>chanrem removes a channel from candide's list of channels to auto-join and manage.
</p>
<pre>Usage: chanrem &lt;channel&gt;
</pre>
<a name="chanset"></a><h5> <span class="mw-headline">chanset</span></h5>
<p>chanset sets a channel's meta-data. See <a href="#Channel_Metadata_List" title="">channel meta-data list</a>
</p>
<pre>Usage: chanset &lt;channel&gt; [key [value]]
</pre>
<p>If both key and value are omitted, chanset will show all the keys and values for that channel. If only value is omitted, chanset will show the value for that key.
</p>
<a name="Channel_Metadata_List"></a><h6> <span class="mw-headline">Channel Metadata List</span></h6>
<ul><li> enabled: when set to a true value, candide will auto-join this channel after identifying to NickServ.
</li><li> chanop: when set to a true value, candide will perform channel management (anti-flooding, ban-evasion, etc).
</li><li> permop: when set to a true value, candide will automatically op itself when joining and remain opped instead of automatically opping and deopping as necessary.
</li></ul>
<a name="chanunset"></a><h5> <span class="mw-headline">chanunset</span></h5>
<p>chanunset deletes a channel's meta-data key.
</p>
<pre>Usage: chanunset &lt;channel&gt; &lt;key&gt;
</pre>
<a name="chanlist"></a><h5> <span class="mw-headline">chanlist</span></h5>
<p>chanlist lists all added channels and their meta-data keys and values.
2014-12-31 02:26:26 +01:00
</p>
<a name="ignore"></a><h4> <span class="mw-headline">ignore</span></h4>
<p>Ignore a user
</p>
2015-10-05 11:27:40 +02:00
<pre>Usage: ignore &lt;hostmask regex&gt; [channel [timeout]]
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<p>Timeout can be specified as an relative time in English; for instance, "5 minutes", "1 month and 2 weeks", "next thursday", "friday after next", and so on.
</p>
2014-12-31 02:26:26 +01:00
<a name="unignore"></a><h4> <span class="mw-headline">unignore</span></h4>
2015-10-05 11:27:40 +02:00
<p>Unignores a user2
</p>
<pre>Usage: unignore &lt;hostmask regex&gt; [channel]
</pre>
<a name="whitelist"></a><h4> <span class="mw-headline">whitelist</span></h4>
<p>Whitelists a hostmask to be exempt from ban evasions.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<pre>Usage: whitelist &lt;show/list&gt;
whitelist add &lt;channel&gt; &lt;hostmask&gt;
whitelist remove &lt;channel&gt; &lt;hostmask&gt;
</pre>
<a name="blacklist"></a><h4> <span class="mw-headline">blacklist</span></h4>
<p>Blacklists a hostmask regex from joining a channel.
</p>
<pre>Usage: blacklist &lt;show/list&gt;
blacklist add &lt;hostmask regex&gt; [channel]
blacklist remove &lt;hostmask regex&gt; [channel]
2014-12-31 02:26:26 +01:00
</pre>
<a name="ban"></a><h4> <span class="mw-headline">ban</span></h4>
2015-10-05 11:27:40 +02:00
<p>Bans a user. If the argument is a nick instead of a hostmask, it will determine an appropriate banmask for that nick.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<pre> Usage: ban &lt;nick or hostmask&gt; [channel [timeout]]
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<p>If timeout is omitted, candide will ban the user for 24 hours. Timeout can be specified as an relative time in English; for instance, "5 minutes", "1 month and 2 weeks", "next thursday", "friday after next", and so on.
2014-12-31 02:26:26 +01:00
</p>
<a name="unban"></a><h4> <span class="mw-headline">unban</span></h4>
2015-10-05 11:27:40 +02:00
<p>Unbans a user. If the argument is a nick instead of a hostmask, it will find all bans that match any of that nick's hostmasks or NickServ accounts and unban them.
2014-12-31 02:26:26 +01:00
</p>
<pre> Usage:
2015-10-05 11:27:40 +02:00
unban &lt;nick or hostmask&gt; [channel]
2014-12-31 02:26:26 +01:00
</pre>
<a name="kick"></a><h4> <span class="mw-headline">kick</span></h4>
<p>Removes a nick from the channel.
</p>
<pre> Usage from channel: kick &lt;nick&gt; &lt;reason&gt;
From private message: kick &lt;channel&gt; &lt;nick&gt; &lt;reason&gt;
</pre>
<a name="export"></a><h4> <span class="mw-headline">export</span></h4>
2015-10-05 11:27:40 +02:00
<p>Exports specified list to website.
</p>
<pre>Usage: export &lt;commands|factoids|quotegrabs|admins|channels&gt;
</pre>
<a name="refresh"></a><h4> <span class="mw-headline">refresh</span></h4>
<p>Refreshes/reloads PBot core modules (not the loadable modules since those are "loaded" each time they are invoked).
</p>
<a name="sl"></a><h4> <span class="mw-headline">sl</span></h4>
<p>Sends a raw IRC line to the server.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<pre>Example: sl PRIVMSG #channel&nbsp;:Test message
2014-12-31 02:26:26 +01:00
</pre>
2015-10-05 11:27:40 +02:00
<a name="die"></a><h4> <span class="mw-headline">die</span></h4>
<p>Kills candide.&nbsp;:-( Causes candide to disconnect and exit.
</p>
2014-12-31 02:26:26 +01:00
<a name=".23.23c"></a><h3> <span class="mw-headline">##c</span></h3>
<a name="C-Aphorisms"></a><h4> <span class="mw-headline">C-Aphorisms</span></h4>
<p>The C Aphorisms can be triggered with c&lt;n&gt; where &lt;n&gt; is an integer representing one of the aphorisms. For example, to quote C Aphorism 1, use `c1`.
</p>
<ol><li> The questioner's first description of the problem/question will be misleading.
</li><li> All examples given by the questioner will be incomplete, misleading, broken, wrong, and/or not representative of the actual question.
</li><li> The questioner will not read and apply the answers they are given but will instead continue to practice c1 and c2.
</li><li> The ignorant will continually mis-educate the questioner.
</li><li> When given a choice of solutions, the questioner will always choose the wrong one.
</li><li> The questioner will always find a reason to say, "It doesn't work."
</li><li> The questioner will paste code and say "I have a problem" or "It doesn't work" without any further information or description of the problem.
</li><li> The more beginner they are, the more likely they are to be overcomplicating it.
</li><li> The questioner will always have some excuse for doing it wrong.
</li><li> The newbie will not accept the answer you give, no matter how right it is.
</li><li> &lt;skipped due to existing c11 factoid&gt;
</li><li> The newbie will think they are smarter than they really are.
</li><li> The newbie will fail to recognize undefined behavior, and will wrongly think that their program is correct because it appears to work.
</li><li> The more the questioner attempts to describe their problem, the less coherent their description becomes.
</li></ol>
<a name="Flood_control"></a><h2> <span class="mw-headline">Flood control</span></h2>
2015-10-05 11:27:40 +02:00
<p>Candide can monitor the channel for excessive rapid traffic originating from an individual and automatically ban the offender for a certain length of time.
2014-12-31 02:26:26 +01:00
</p>
<a name="Message_flood"></a><h3> <span class="mw-headline">Message flood</span></h3>
2015-10-05 11:27:40 +02:00
<p>If four (4) or more messages are sent within five (5) seconds, the flood control is triggered. The offender will be muted for 30 seconds for the first offense. Each additional offense will result in the offender being muted for a much longer period. For example, the first offense will result in 30 seconds, the 2nd offense will be 5 minutes, the 3rd will be 1 hour, and so on. The offense counter is decremented once every 24 hours.
</p><p>The offender will be sent the following private message: "You have been muted due to flooding. Please use a web paste service such as <a href="http://ideone.com" class="external free" title="http://ideone.com" rel="nofollow">http://ideone.com</a> for lengthy pastes. You will be allowed to speak again in $timeout."
2014-12-31 02:26:26 +01:00
</p>
<a name="Join_flood"></a><h3> <span class="mw-headline">Join flood</span></h3>
<p>If four (4) or more JOINs are observed within thirty (30) minutes <b>without any messages in between joins</b>, the offender will be forwarded to another channel for a limited time: 2^(number_of_offenses + 2) hours.
2015-10-05 11:27:40 +02:00
</p><p>In addition to private instructions from candide, this channel will have a /topic and ChanServ on-join message with instructions explaining to the offender how to remove the forwarding. The instructions are to message candide with: unbanme &lt;channel&gt;.
</p><p>Any messages sent to the public channel by the user at any time will reset their JOIN counter back to zero. The unbanme command can only be used for the first two offenses -- the offense counter is decremented once every 24 hours.
</p><p>The offender will be sent the following private message: "You have been banned from $channel due to join flooding. If your connection issues have been resolved, or this was an accident, you may request an unban at any time by responding to this message with: unbanme $channel, otherwise you will be automatically unbanned in $timeout."
2014-12-31 02:26:26 +01:00
</p>
<a name="Enter_key_abuse"></a><h3> <span class="mw-headline">Enter key abuse</span></h3>
<p>If four (4) consecutive messages are sent with ten (10) seconds or less between individual messages and without another person speaking, an enter-key-abuse counter is incremented. This counter will then continue to be incremented every two (2) consecutive messages with ten (10) seconds or less in between until another person speaks or more than ten (10) seconds have elapsed, whereupon it returns to requiring four (4) consecutive messages. When this counter reaches three (3) or greater, the offender will be muted using the same timeout rules as message flooding. This counter is automatically decremented once per hour.
2015-10-05 11:27:40 +02:00
</p><p>The offender will be sent the following private message: "You have been muted due to abusing the enter key. Please do not split your sentences over multiple messages. You will be allowed to speak again in $timeout."
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Nick_flood"></a><h3> <span class="mw-headline">Nick flood</span></h3>
<p>If four (4) or more nick-changes are observed within thirty (30) minutes, the nick-change flood control is triggered. The offender will be muted for 15 minutes for the first offense. Each additional offense will result in the offender being muted for a much longer period. The offense counter is decremented once every 24 hours.
</p><p>The offender will be sent the following private message: "You have been temporarily banned due to nick-change flooding. You will be unbanned in $timeout."
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Anti-away.2FNick-control"></a><h2> <span class="mw-headline">Anti-away/Nick-control</span></h2>
<p>Candide can detect nick-changes to undesirable nicks such as those ending with |away, as well as undesirable ACTIONs such as /me is away.
</p><p>When such a case is detected, Candide will kick the offender with a link to <a href="http://sackheads.org/~bnaylor/spew/away_msgs.html" class="external free" title="http://sackheads.org/~bnaylor/spew/away_msgs.html" rel="nofollow">http://sackheads.org/~bnaylor/spew/away_msgs.html</a> in the kick message.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Anti-auto-rejoin_control"></a><h2> <span class="mw-headline">Anti-auto-rejoin control</span></h2>
<p>Candide can detect if someone immediately auto-rejoins after having been kicked.
</p><p>When such a case is detected, Candide will kickban the offender (with a kick message of "$timeout ban for auto-rejoining after kick") for 5 minutes for the first offense. Each additional offense will result in the offender being banned for a much longer period. The offense counter is decremented once every 24 hours.
2014-12-31 02:26:26 +01:00
</p>
2015-10-05 11:27:40 +02:00
<a name="Opping.2FDeopping"></a><h2> <span class="mw-headline">Opping/Deopping</span></h2>
<p>ChanServ will automagically op and deop Candide when necessary. Candide will wait until about 5 minutes have elapsed before requesting a deop from ChanServ.
2014-12-31 02:26:26 +01:00
</p>
<hr />
<p><a href="/wiki/Category_IRC" title="Category IRC">Category IRC</a>
</p>
2015-10-05 11:27:40 +02:00
<!-- Saved in parser cache with key wikidb:pcache:idhash:935-0!1!0!!en!2!edit=0 and timestamp 20151005092610 -->
2014-12-31 02:26:26 +01:00
<div class="printfooter">
2015-10-05 11:27:40 +02:00
Retrieved from "<a href="http://www.iso-9899.info/wiki/Candide">http://www.iso-9899.info/wiki/Candide</a>"</div>
2014-12-31 02:26:26 +01:00
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5>Views</h5>
<div class="pBody">
<ul>
2015-10-05 11:27:40 +02:00
<li id="ca-nstab-main" class="selected"><a href="/wiki/Candide" title="View the content page [c]" accesskey="c">Article</a></li>
<li id="ca-talk"><a href="/wiki/Talk:Candide" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
<li id="ca-viewsource"><a href="/wiki?title=Candide&amp;action=edit" title="This page is protected. You can view its source. [e]" accesskey="e">View source</a></li>
<li id="ca-history"><a href="/wiki?title=Candide&amp;action=history" title="Past versions of this page. [h]" accesskey="h">History</a></li>
2014-12-31 02:26:26 +01:00
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5>Personal tools</h5>
<div class="pBody">
<ul>
2015-10-05 11:27:40 +02:00
<li id="pt-login"><a href="/wiki?title=Special:Userlogin&amp;returnto=Candide" title="You are encouraged to log in, it is not mandatory however. [o]" accesskey="o">Log in</a></li>
2014-12-31 02:26:26 +01:00
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(/wiki.png);" href="/wiki/Main_Page" title="Visit the Main Page [z]" accesskey="z"></a>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<div class='portlet' id='p-navigation'>
<h5>Navigation</h5>
<div class='pBody'>
<ul>
<li id="n-mainpage"><a href="/wiki/Main_Page" title="Visit the Main Page [z]" accesskey="z">Main Page</a></li>
<li id="n-portal"><a href="/wiki/C:Community_Portal" title="About the project, what you can do, where to find things">Community portal</a></li>
<li id="n-currentevents"><a href="/wiki/Current_events" title="Find background information on current events">Current events</a></li>
<li id="n-recentchanges"><a href="/wiki/Special:Recentchanges" title="The list of recent changes in the wiki. [r]" accesskey="r">Recent changes</a></li>
<li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li>
<li id="n-help"><a href="/wiki/Help:Contents" title="The place to find out.">Help</a></li>
</ul>
</div>
</div>
<div id="p-search" class="portlet">
<h5><label for="searchInput">Search</label></h5>
<div id="searchBody" class="pBody">
<form action="/wiki/Special:Search" id="searchform"><div>
<input id="searchInput" name="search" type="text" title="Search C [f]" accesskey="f" value="" />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" />&nbsp;
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" />
</div></form>
</div>
</div>
<div class="portlet" id="p-tb">
<h5>Toolbox</h5>
<div class="pBody">
<ul>
2015-10-05 11:27:40 +02:00
<li id="t-whatlinkshere"><a href="/wiki/Special:Whatlinkshere/Candide" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
<li id="t-recentchangeslinked"><a href="/wiki/Special:Recentchangeslinked/Candide" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
2014-12-31 02:26:26 +01:00
<li id="t-specialpages"><a href="/wiki/Special:Specialpages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
2015-10-05 11:27:40 +02:00
<li id="t-print"><a href="/wiki?title=Candide&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> <li id="t-permalink"><a href="/wiki?title=Candide&amp;oldid=9111" title="Permanent link to this version of the page">Permanent link</a></li> </ul>
2014-12-31 02:26:26 +01:00
</div>
</div>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/wiki/skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
<ul id="f-list">
2015-10-05 11:27:40 +02:00
<li id="lastmod"> This page was last modified 09:24, 5 October 2015.</li>
<li id="viewcount">This page has been accessed 42,850 times.</li>
2014-12-31 02:26:26 +01:00
<li id="privacy"><a href="/wiki/C:Privacy_policy" title="C:Privacy policy">Privacy policy</a></li>
<li id="about"><a href="/wiki/C:About" title="C:About">About C</a></li>
<li id="disclaimer"><a href="/wiki/C:General_disclaimer" title="C:General disclaimer">Disclaimers</a></li>
</ul>
</div>
2015-10-05 11:27:40 +02:00
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
2014-12-31 02:26:26 +01:00
</div>
2015-10-05 11:27:40 +02:00
<!-- Served in 0.349 secs. --></body></html>