From 2e8c820dbbd45d1a339004fdc656038e16454e7b Mon Sep 17 00:00:00 2001 From: kyoshiro Date: Wed, 15 Nov 2006 21:13:51 +0000 Subject: [PATCH] lex/conf.y cleanups vim syntax, manpage, sample conf file updates --- bip.conf.1 | 10 ++++++++++ samples/bip.conf | 15 +++++++++++++++ samples/bip.vim | 8 ++++++-- src/conf.y | 3 +-- src/lex.l | 2 -- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/bip.conf.1 b/bip.conf.1 index e4e90f1..75f419a 100644 --- a/bip.conf.1 +++ b/bip.conf.1 @@ -88,6 +88,11 @@ talk (channel/private message or action). It means that next time you log to your bip session the backlogging will start at the time right after your last words on irc. +.TP +\fBbl_msg_only\fP (default: \fBfalse\fP) +When true, bip will backlog only channel/private messages/notices. No topic +change, nick change, user quit/part/join will be backlogged upon connection. + .TP \fBclient_side_ssl\fP (default: \fBfalse\fP) When true, clients will need to connect to BIP using SSL. @@ -220,6 +225,11 @@ once. If true, and if there are no more client attached, BIP will change nickname to this \fBaway_nick\fP. Your nickname will be restored upon client connect. +.TP +\fBno_client_away_msg\fP (default: \fBnot set\fP) +This options allows you to set an away message. This away message will be set +when the last client disconnects, and removed when a client connects. + .TP \fBfollow_nick\fP (default: \fBfalse\fP) If set to true, when you change nick, BIP stores the new nickname as the new diff --git a/samples/bip.conf b/samples/bip.conf index ec187ba..99a7394 100644 --- a/samples/bip.conf +++ b/samples/bip.conf @@ -46,6 +46,11 @@ always_backlog = true; # backlog even lines already backlogged # back on backlog #blreset_on_talk = false; +# If bl_msg_only is true, only channel and private messages will be backlogged +# upon the reconnection of a client. Default is false, thus joins, parts, quits, +# nick changes, topic changes, ... are backlogged +#bl_msg_only = false; + # Network definition, a name and server info network { name = "iiens"; @@ -108,6 +113,14 @@ user { name = "iiens"; # used by bip only network = "iiens"; # which ircnet to connect to + # If you have multiple IP addresses, you can set the one you + # want bip to use here. See manpage for more information + #vhost = "192.168.10.6"; + + # When source_port is defined, bip will connect to the IRC + # server from this port number. That means the IRC server will + # see the socket coming from :source_port. + #source_port = "4567"; # these will be sent to the real server #user = "otheruser"; @@ -116,6 +129,8 @@ user { # Some options: #away_nick = "bip`away"; + # Away message to be set when no client is connected + #no_client_away_msg = "Having life, knock again later"; #follow_nick = true; #ignore_first_nick = true; #on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword"; diff --git a/samples/bip.vim b/samples/bip.vim index 1a238a0..579abba 100644 --- a/samples/bip.vim +++ b/samples/bip.vim @@ -53,7 +53,7 @@ syn region bipMain start=/\%^/ end=/\%$/ " Top level elements syn keyword bipKeyword contained nextgroup=bipBoolV client_side_ssl - \ no_backlog always_backlog + \ no_backlog always_backlog bl_msg_only blreset_on_talk syn keyword bipKeyword contained nextgroup=bipStringV log_root \ log_format pid_file syn keyword bipKeyword contained nextgroup=bipNumericV port log_level @@ -72,6 +72,8 @@ syn region bipUser contained matchgroup=Macro start=/user\s*{\s*/ \ end=/};/ \ contains=bipUKeyword,bipConnection,bipComment,bipEndError,bipWhite syn keyword bipUKeyword contained nextgroup=bipStringV password name + \ default_nick default_user default_realname ssl_check_store + \ ssl_check_mode " Connection block (level 2) syn region bipConnection contained matchgroup=Macro @@ -80,8 +82,10 @@ syn region bipConnection contained matchgroup=Macro syn keyword bipCoKeyword contained nextgroup=bipBoolV ssl follow_nick \ ignore_first_nick syn keyword bipCoKeyword contained nextgroup=bipStringV name user nick - \ network password vhost away_nick on_connect_send login realname + \ network password vhost away_nick on_connect_send realname + \ no_client_away_msg syn keyword bipCoKeyword contained nextgroup=bipNumericV source_port +no_client_away_msg " Channel elements (lvl 2) syn region bipChannel contained matchgroup=Macro diff --git a/src/conf.y b/src/conf.y index ee0a6fd..b700415 100644 --- a/src/conf.y +++ b/src/conf.y @@ -80,7 +80,7 @@ struct tuple *tuple_l_new(int type, void *p) %} -%token LEX_IP LEX_EQ LEX_PORT LEX_CSS LEX_SEMICOLON LEX_CONNECTION LEX_NETWORK LEX_LBRA LEX_RBRA LEX_USER LEX_NAME LEX_USERNAME LEX_NICK LEX_SERVER LEX_PASSWORD LEX_SRCIP LEX_HOST LEX_VHOST LEX_SOURCE_PORT LEX_NONE LEX_COMMENT LEX_BUNCH LEX_REALNAME LEX_SSL LEX_SSL_CHECK_MODE LEX_SSL_CHECK_STORE LEX_CHANNEL LEX_KEY LEX_LOG_ROOT LEX_LOG_FORMAT LEX_LOG_LEVEL LEX_BACKLOG_LINES LEX_BACKLOG LEX_LOG LEX_LOG_SYNC_INTERVAL LEX_FOLLOW_NICK LEX_ON_CONNECT_SEND LEX_AWAY_NICK LEX_PID_FILE LEX_IGN_FIRST_NICK LEX_ALWAYS_BACKLOG LEX_LOGIN LEX_BLRESET_ON_TALK LEX_DEFAULT_USER LEX_DEFAULT_NICK LEX_DEFAULT_REALNAME LEX_NO_CLIENT_AWAY_MSG LEX_BL_MSG_ONLY +%token LEX_IP LEX_EQ LEX_PORT LEX_CSS LEX_SEMICOLON LEX_CONNECTION LEX_NETWORK LEX_LBRA LEX_RBRA LEX_USER LEX_NAME LEX_NICK LEX_SERVER LEX_PASSWORD LEX_SRCIP LEX_HOST LEX_VHOST LEX_SOURCE_PORT LEX_NONE LEX_COMMENT LEX_BUNCH LEX_REALNAME LEX_SSL LEX_SSL_CHECK_MODE LEX_SSL_CHECK_STORE LEX_CHANNEL LEX_KEY LEX_LOG_ROOT LEX_LOG_FORMAT LEX_LOG_LEVEL LEX_BACKLOG_LINES LEX_BACKLOG LEX_LOG LEX_LOG_SYNC_INTERVAL LEX_FOLLOW_NICK LEX_ON_CONNECT_SEND LEX_AWAY_NICK LEX_PID_FILE LEX_IGN_FIRST_NICK LEX_ALWAYS_BACKLOG LEX_BLRESET_ON_TALK LEX_DEFAULT_USER LEX_DEFAULT_NICK LEX_DEFAULT_REALNAME LEX_NO_CLIENT_AWAY_MSG LEX_BL_MSG_ONLY %union { int number; @@ -170,7 +170,6 @@ con_command: LEX_NAME LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_NAME, $3); } | LEX_NETWORK LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_NETWORK, $3); } - | LEX_LOGIN LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_LOGIN, $3); } | LEX_NICK LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_NICK, $3); } | LEX_USER LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_USER, $3); } | LEX_REALNAME LEX_EQ LEX_STRING { $$ = tuple_s_new(LEX_REALNAME, diff --git a/src/lex.l b/src/lex.l index 99fbc24..9888ca8 100644 --- a/src/lex.l +++ b/src/lex.l @@ -62,9 +62,7 @@ list_t *parse_conf(FILE *file) "network" { return LEX_NETWORK; } "host" { return LEX_HOST; } "name" { return LEX_NAME; } -"username" { return LEX_USERNAME; } "user" { return LEX_USER; } -"login" { return LEX_LOGIN; } "connection" { return LEX_CONNECTION; } "nick" { return LEX_NICK; } "realname" { return LEX_REALNAME; }