mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-25 01:34:49 +00:00
- Fixed up previous CHANINFO patch ...
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: irc-channel.c,v 1.21.2.4 2003/01/08 20:32:17 alex Exp $";
|
static char UNUSED id[] = "$Id: irc-channel.c,v 1.21.2.5 2003/01/08 23:09:34 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -371,11 +371,11 @@ IRC_CHANINFO( CLIENT *Client, REQUEST *Req )
|
|||||||
assert( Req != NULL );
|
assert( Req != NULL );
|
||||||
|
|
||||||
/* Bad number of parameters? */
|
/* Bad number of parameters? */
|
||||||
if(( Req->argc < 1 ) || ( Req->argc > 5 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
|
if(( Req->argc < 2 ) || ( Req->argc == 4 ) || ( Req->argc > 5 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
|
||||||
|
|
||||||
/* Compatibility kludge */
|
/* Compatibility kludge */
|
||||||
if( Req->argc == 5 ) arg_topic = 5;
|
if( Req->argc == 5 ) arg_topic = 4;
|
||||||
else if( Req->argc == 3 ) arg_topic = 3;
|
else if( Req->argc == 3 ) arg_topic = 2;
|
||||||
else arg_topic = -1;
|
else arg_topic = -1;
|
||||||
|
|
||||||
/* Search origin */
|
/* Search origin */
|
||||||
@@ -409,7 +409,7 @@ IRC_CHANINFO( CLIENT *Client, REQUEST *Req )
|
|||||||
{
|
{
|
||||||
/* We got a topic */
|
/* We got a topic */
|
||||||
ptr = Channel_Topic( chan );
|
ptr = Channel_Topic( chan );
|
||||||
if( ! *ptr )
|
if(( ! *ptr ) && ( Req->argv[arg_topic][0] ))
|
||||||
{
|
{
|
||||||
/* OK, there is no topic jet */
|
/* OK, there is no topic jet */
|
||||||
Channel_SetTopic( chan, Req->argv[arg_topic] );
|
Channel_SetTopic( chan, Req->argv[arg_topic] );
|
||||||
|
|||||||
Reference in New Issue
Block a user