aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2005-11-16 15:22:22 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2005-11-16 15:22:22 +0100
commitea85a0b99185c53fac40c2150937d5e1a2ca546a (patch)
tree9d73fae998dcffc516817a7479f4ddd641053383
parentbb556db516af064649588a771048b004852e4f49 (diff)
Some more formatting changes in the auth. request messages
-rw-r--r--query.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/query.c b/query.c
index b21c39e1..670dde36 100644
--- a/query.c
+++ b/query.c
@@ -130,12 +130,12 @@ void query_answer( irc_t *irc, query_t *q, int ans )
if( ans )
{
q->yes( NULL, q->data );
- serv_got_crap( q->gc, "\2Accepted\2: %s", q->question );
+ serv_got_crap( q->gc, "Accepted: %s", q->question );
}
else
{
q->no( NULL, q->data );
- serv_got_crap( q->gc, "\2Rejected\2: %s", q->question );
+ serv_got_crap( q->gc, "Rejected: %s", q->question );
}
q->data = NULL;
@@ -149,13 +149,11 @@ static void query_display( irc_t *irc, query_t *q )
{
if( q->gc )
{
- serv_got_crap( q->gc, "New request:" );
- serv_got_crap( q->gc, "%s\nYou can use the yes/no commands to accept/reject this request.", q->question );
+ serv_got_crap( q->gc, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question );
}
else
{
- irc_usermsg( irc, "New request:" );
- irc_usermsg( irc, "%s\nYou can use the yes/no commands to accept/reject this request.", q->question );
+ irc_usermsg( irc, "New request: %s\nYou can use the \2yes\2/\2no\2 commands to accept/reject this request.", q->question );
}
}
padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?xml version='1.0'?>
<!--
	Convert BitlBee XML documentation to DocBook
	(C) 2004 Jelmer Vernooij
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:exsl="http://exslt.org/common"
	version="1.1"
	extension-element-prefixes="exsl">

	<xsl:output method="xml" encoding="UTF-8" doctype-public="-//OASIS//DTD DocBook XML V4.2//EN" indent="yes" doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>

	<xsl:strip-space elements="*"/>

	<xsl:template match="ircline">
		<xsl:element name="prompt"><xsl:text>&lt; </xsl:text><xsl:value-of select="@nick"/><xsl:text>&gt; </xsl:text></xsl:element>
		<xsl:element name="userinput"><xsl:value-of select="normalize-space(.)"/></xsl:element><xsl:text>&#10;</xsl:text>
	</xsl:template>

	<xsl:template match="ircaction">
		<xsl:text> * </xsl:text><xsl:value-of select="@nick"/><xsl:text> </xsl:text><xsl:value-of select="normalize-space(.)"/><xsl:text>&#10;</xsl:text>
	</xsl:template>

	<xsl:template match="ircexample">
		<xsl:element name="screen">
			<xsl:for-each select="ircline|ircaction">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</xsl:element>
	</xsl:template>


	<!-- This is needed to copy content unchanged -->
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>

	<xsl:template name="subcmd-list">
		<xsl:if test="bitlbee-command != ''">
			<xsl:element name="variablelist">
				<xsl:for-each select="bitlbee-command">
					<xsl:element name="varlistentry">
						<xsl:element name="term">
							<xsl:value-of select="@name"/>
						</xsl:element>
						<xsl:element name="listitem">
							<xsl:element name="para">
								<xsl:value-of select="short-description"/>
							</xsl:element>
						</xsl:element>
					</xsl:element>
				</xsl:for-each>
			</xsl:element>
		</xsl:if>
	</xsl:template>

	<xsl:template match="command-list">
		<xsl:call-template name="subcmd-list"/>
	</xsl:template>

	<xsl:template match="bitlbee-setting">
		<xsl:element name="sect1">
			<xsl:attribute name="id">
				<xsl:text>set_</xsl:text>
				<xsl:value-of select="@name"/>
			</xsl:attribute>
			<xsl:element name="title"><xsl:value-of select="@name"/></xsl:element>

			<xsl:element name="simplelist">
				<xsl:element name="member">
					<xsl:text>Type: </xsl:text><xsl:value-of select="@type"/>
				</xsl:element>
			</xsl:element>

			<xsl:for-each select="description/para">
				<xsl:apply-templates select="."/>
			</xsl:for-each>

		</xsl:element>
	</xsl:template>

	<xsl:template name="cmd">
		<xsl:param name="prefix"/>
		<xsl:variable name="thiscmd"><xsl:value-of select="$prefix"/><xsl:value-of select="@name"/></xsl:variable>
		<xsl:attribute name="id">
			<xsl:text>cmd_</xsl:text>
			<xsl:value-of select="translate($thiscmd,' ','_')"/>
		</xsl:attribute>
		<xsl:element name="title"><xsl:value-of select="$thiscmd"/>
			<xsl:if test="short-description">
				<xsl:text> - </xsl:text>
				<xsl:value-of select="short-description"/>
			</xsl:if>
		</xsl:element>

		<xsl:element name="formalpara">
			<xsl:element name="title"><xsl:text>Syntax:</xsl:text></xsl:element>
			<xsl:element name="para">
				<xsl:element name="programlisting">
					<xsl:for-each select="syntax">
						<xsl:value-of select="normalize-space(.)"/><xsl:text>&#10;</xsl:text>
					</xsl:for-each>
				</xsl:element>
			</xsl:element>
		</xsl:element>

		<xsl:for-each select="description/para">
			<xsl:apply-templates select="."/>
		</xsl:for-each>

		<xsl:for-each select="ircexample">
			<xsl:apply-templates select="."/>
		</xsl:for-each>

		<!--<xsl:call-template name="subcmd-list"/>-->

		<xsl:for-each select="bitlbee-command">
			<xsl:element name="sect2">
				<xsl:call-template name="cmd">
					<xsl:with-param name="prefix"><xsl:value-of select="$thiscmd"/><xsl:text> </xsl:text>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:element>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="bitlbee-command">
		<xsl:element name="sect1">
			<xsl:call-template name="cmd">
				<xsl:with-param name="prefix" select="''"/>
			</xsl:call-template>
		</xsl:element>
	</xsl:template>

	</xsl:stylesheet>