aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules14
1 files changed, 7 insertions, 7 deletions
diff --git a/debian/rules b/debian/rules
index 0b8a4dd6..c5397085 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,10 @@ ifndef BITLBEE_VERSION
BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\"
endif
+ifneq ($(BITLBEE_LIBPURPLE),1)
+DH_OPTIONS += -Nbitlbee-libpurple
+endif
+
build: build-stamp
build-stamp:
dh_testdir
@@ -90,20 +94,16 @@ else
dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+b[0-9]\+$$//')
endif
dh_md5sums
-ifeq ($(BITLBEE_LIBPURPLE),1)
dh_builddeb
-else
- dh_builddeb -Nbitlbee-libpurple
-endif
binary-indep: build install
- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+ DH_OPTIONS=-i $(MAKE) -f debian/rules binary-common
binary-arch: build install
- $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+ DH_OPTIONS=-a $(MAKE) -f debian/rules binary-common
binary-%: build install
- make -f debian/rules binary-common DH_OPTIONS=-p$*
+ DH_OPTIONS=-p$* $(MAKE) -f debian/rules binary-common
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary-common binary install
d='n140' href='#n140'>140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
  /********************************************************************\
  * BitlBee -- An IRC to other IM-networks gateway                     *
  *                                                                    *
  * Copyright 2002-2004 Wilmer van der Gaast and others                *
  \********************************************************************/

/* MSN module - Some tables with useful data                            */

/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License with
  the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
  if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  Suite 330, Boston, MA  02111-1307  USA
*/

#include "nogaim.h"
#include "msn.h"

const struct msn_away_state msn_away_state_list[] =
{
	{  0, "NLN", "Available" },
	{  1, "BSY", "Busy" },
	{  3, "IDL", "Idle" },
	{  5, "BRB", "Be Right Back" },
	{  7, "AWY", "Away" },
	{  9, "PHN", "On the Phone" },
	{ 11, "LUN", "Out to Lunch" },
	{ 13, "HDN", "Hidden" },
	{ -1, "",    "" }
};

const struct msn_away_state *msn_away_state_by_number( int number )
{
	int i;
	
	for( i = 0; msn_away_state_list[i].number > -1; i ++ )
		if( msn_away_state_list[i].number == number )
			return( msn_away_state_list + i );
	
	return( NULL );
}

const struct msn_away_state *msn_away_state_by_code( char *code )
{
	int i;
	
	for( i = 0; msn_away_state_list[i].number > -1; i ++ )
		if( g_strcasecmp( msn_away_state_list[i].code, code ) == 0 )
			return( msn_away_state_list + i );
	
	return( NULL );
}

const struct msn_away_state *msn_away_state_by_name( char *name )
{
	int i;
	
	for( i = 0; msn_away_state_list[i].number > -1; i ++ )
		if( g_strcasecmp( msn_away_state_list[i].name, name ) == 0 )
			return( msn_away_state_list + i );
	
	return( NULL );
}

const struct msn_status_code msn_status_code_list[] =
{
	{ 200, "Invalid syntax",                                        0 },
	{ 201, "Invalid parameter",                                     0 },
	{ 205, "Invalid (non-existent) handle",                         0 },
	{ 206, "Domain name missing",                                   0 },
	{ 207, "Already logged in",                                     0 },
	{ 208, "Invalid handle",                                        STATUS_SB_IM_SPARE },
	{ 209, "Forbidden nickname",                                    0 },
	{ 210, "Buddy list too long",                                   0 },
	{ 215, "Handle is already in list",                             0 },
	{ 216, "Handle is not in list",                                 STATUS_SB_IM_SPARE },
	{ 217, "Person is off-line or non-existent",                    STATUS_SB_IM_SPARE },
	{ 218, "Already in that mode",                                  0 },
	{ 219, "Handle is already in opposite list",                    0 },
	{ 223, "Too many groups",                                       0 },
	{ 224, "Invalid group or already in list",                      0 },
	{ 225, "Handle is not in that group",                           0 },
	{ 229, "Group name too long",                                   0 },
	{ 230, "Cannot remove that group",                              0 },
	{ 231, "Invalid group",                                         0 },
	{ 280, "Switchboard failed",                                    STATUS_SB_FATAL },
	{ 281, "Transfer to switchboard failed",                        0 },
	
	{ 300, "Required field missing",                                0 },
	{ 302, "Not logged in",                                         0 },
	
	{ 500, "Internal server error/Account banned",                  STATUS_FATAL },
	{ 501, "Database server error",                                 STATUS_FATAL },
	{ 502, "Command disabled",                                      0 },
	{ 510, "File operation failed",                                 STATUS_FATAL },
	{ 520, "Memory allocation failed",                              STATUS_FATAL },
	{ 540, "Challenge response invalid",                            STATUS_FATAL },
	
	{ 600, "Server is busy",                                        STATUS_FATAL },
	{ 601, "Server is unavailable",                                 STATUS_FATAL },
	{ 602, "Peer nameserver is down",                               STATUS_FATAL },
	{ 603, "Database connection failed",                            STATUS_FATAL },
	{ 604, "Server is going down",                                  STATUS_FATAL },
	{ 605, "Server is unavailable",                                 STATUS_FATAL },
	
	{ 700, "Could not create connection",                           STATUS_FATAL },
	{ 710, "Invalid CVR parameters",                                STATUS_FATAL },
	{ 711, "Write is blocking",                                     STATUS_FATAL },
	{ 712, "Session is overloaded",                                 STATUS_FATAL },
	{ 713, "Calling too rapidly",                                   STATUS_SB_IM_SPARE },
	{ 714, "Too many sessions",                                     STATUS_FATAL },
	{ 715, "Not expected/Invalid argument/action",                  0 },
	{ 717, "Bad friend file",                                       STATUS_FATAL },
	{ 731, "Not expected/Invalid argument",                         0 },
	
	{ 800, "Changing too rapidly",                                  0 },
	
	{ 910, "Server is busy",                                        STATUS_FATAL },
	{ 911, "Authentication failed",                                 STATUS_SB_FATAL | STATUS_FATAL },
	{ 912, "Server is busy",                                        STATUS_FATAL },
	{ 913, "Not allowed when hiding",                               0 },
	{ 914, "Server is unavailable",                                 STATUS_FATAL },
	{ 915, "Server is unavailable",                                 STATUS_FATAL },
	{ 916, "Server is unavailable",                                 STATUS_FATAL },
	{ 917, "Authentication failed",                                 STATUS_FATAL },
	{ 918, "Server is busy",                                        STATUS_FATAL },
	{ 919, "Server is busy",                                        STATUS_FATAL },
	{ 920, "Not accepting new principals",                          0 }, /* When a sb is full? */
	{ 922, "Server is busy",                                        STATUS_FATAL },
	{ 923, "Kids Passport without parental consent",                STATUS_FATAL },
	{ 924, "Passport account not yet verified",                     STATUS_FATAL },
	{ 928, "Bad ticket",                                            STATUS_FATAL },
	{  -1, NULL,                                                    0 }
};

const struct msn_status_code *msn_status_by_number( int number )
{
	static struct msn_status_code *unknown = NULL;
	int i;
	
	for( i = 0; msn_status_code_list[i].number >= 0; i ++ )
		if( msn_status_code_list[i].number == number )
			return( msn_status_code_list + i );
	
	if( unknown == NULL )
	{
		unknown = g_new0( struct msn_status_code, 1 );
		unknown->text = g_new0( char, 128 );
	}
	
	unknown->number = number;
	unknown->flags = 0;
	g_snprintf( unknown->text, 128, "Unknown error (%d)", number );
	
	return( unknown );
}