Modify

#67 closed enhancement (wontfix)

Fixes irc.c to support Naim

Reported by: meatmanek@… Owned by:
Priority: minor Milestone:
Component: IRC Version: 1.0
Keywords: Cc:
IRC client+version: naim Operating System: Public server
OS version/distro:

Description

This patch will fix irc.c to allow Naim to work properly with bitlbee. I don't think this would break anything else - it doesn't affect anything major.

diff -urNd bitlbee-1.0/irc.c bitlbee-1.0-patched/irc.c
--- bitlbee-1.0/irc.c   2005-12-03 19:45:34.000000000 -0500
+++ bitlbee-1.0-patched/irc.c   2005-12-23 17:21:29.000000000 -0500
@@ -552,8 +552,11 @@
                        irc_reply( irc, 461, "%s :Need more parameters", cmd[0] );
                }
                else if( g_strcasecmp( cmd[1], irc->channel ) == 0 )
-                       ; /* Dude, you're already there...
-                            RFC doesn't have any reply for that though? */
+               {
+                       user_t *u = user_find( irc, irc->nick );// Some clients are picky about forcejoins, so if they try to join
+                       irc_join( irc, u, irc->channel );       // manually, send them a proper reply.
+               }
+
                else if( cmd[1] )
                {
                        if( ( cmd[1][0] == '#' || cmd[1][0] == '&' ) && cmd[1][1] )
@@ -1385,6 +1388,10 @@
                        }
                        return( 1 );
                }
+               else if( g_strcasecmp( nick, irc->nick ) == 0 )
+               {
+                       return( 1 ); // Ignore CTCPs to ourself. This prevents clients that self-ping from getting really annoying.
+               }
                else
                {
                        irc_usermsg( irc, "Non-ACTION CTCP's aren't supported" );

Attachments (0)

Change History (2)

comment:1 Changed at 2005-12-24T02:54:30Z by dan@…

I'm also an naim user and have verified this patch against 1.0 from freebsd ports. Without in naim + + bitlbee doesn't work well.ll

comment:2 Changed at 2005-12-24T15:38:46Z by Jelmer Vernooij

Resolution: wontfix
Status: newclosed

This is a bug in naim, not BitlBee. It is perfectly fine, according to the RFCs, to force a user to join a channel. 'JOIN' command to a channel you've already joined should simply be ignored by the IRC server (as happens on all 'real' IRC servers). Also, this patch does change the behaviour for IRC clients that do issue a erroneous extra JOIN but also notice the forced join.

Why is the extra code for CTCP necessary? Does BitlBee behave differently then other IRC servers for messages to yourself?

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.