- - PR -
irc2.10.3p7+hemp2+jp6.tar.gzのインストールについて
1
投稿者 | 投稿内容 | ||||
---|---|---|---|---|---|
|
投稿日時: 2004-12-19 23:18
初めて投稿します。よろしくお願い致します。
現在、Fedora Core 3を使用しています。 プライベートなIRCサーバを建てたくて件名の物を発見したのですが どうもうまくインストールできません。 解凍し、 ./configure とした後に、 cd i686-pc-linux-gnu とし、 make all をしました。 エラー内容は以下の通りです。 ../ircd/channel.c: In function `free_channel': ../ircd/channel.c:2152: 警告: use of cast expressions as lvalues is deprecated ../ircd/channel.c: In function `m_list': ../ircd/channel.c:3260: error: label at end of compound statement となっており、channel.cが悪いのかよくわかりません。 わかる方いらっしゃいましたらよろしくお願い致します。 | ||||
|
投稿日時: 2004-12-20 11:35
取り敢えず、 3260行目前後を見せて貰わないと。
関連するグローバル変数とか構造体とか、ローカル変数の宣言部分も。 | ||||
|
投稿日時: 2004-12-20 12:36
ご返答有り難うございます。長文失礼します。
3260行目付近ですが、}に当てはまってしまったのでm_listの関数を貼り付けます。 int m_list(cptr, sptr, parc, parv) aClient *cptr, *sptr; int parc; char *parv[]; { aChannel *chptr; char *name, *p = NULL; int rlen = 0; if (parc > 2 && hunt_server(cptr, sptr, ":%s LIST %s %s", 2, parc, parv)) return MAXPENALTY; if (BadPtr(parv[1])) { int maxsendq = 0; Reg Link *lp; int listedchannels = 0; if (!sptr->user) { sendto_one(sptr, rpl_str(RPL_LISTEND, parv[0])); return 2; } #ifdef LIST_ALIS_NOTE if (MyConnect(sptr)) { sendto_one(sptr,":%s NOTICE %s :%s",ME,parv[0],LIST_ALIS_NOTE); } #endif /* Keep 10% of sendQ free * Note: Definition of LIST command prevents obtaining * of complete LIST from remote server, if this * behaviour is changed, MyConnect() check needs to be added * here and within following loops as well. - jv */ maxsendq = (int) ((float) get_sendq(sptr) * (float) 0.9); /* First, show all +s/+p user is on */ for (lp = sptr->user->channel; lp; lp = lp->next) { chptr = lp->value.chptr; if (SecretChannel(chptr) || HiddenChannel(chptr)) { sendto_one(sptr, rpl_str(RPL_LIST, parv[0]), chptr->chname,chptr->users, chptr->topic); listedchannels++; if (DBufLength(&sptr->sendQ) > maxsendq) { sendto_one(sptr, err_str(ERR_TOOMANYMATCHES, parv[0]), "LIST"); goto end_of_list; } } } /* Second, show all visible channels * +p channels users is not on, are not reported anymore - jv */ for (chptr = channel; chptr; chptr = chptr->nextch) { if (!chptr->users || /* empty locked channel */ SecretChannel(chptr) || HiddenChannel(chptr)) continue; sendto_one(sptr, rpl_str(RPL_LIST, parv[0]), chptr->chname, chptr->users, chptr->topic); listedchannels++; if (DBufLength(&sptr->sendQ) > maxsendq) { sendto_one(sptr, err_str(ERR_TOOMANYMATCHES, parv[0]), "LIST"); break; } } end_of_list: #ifdef LIST_ALIS_NOTE /* Send second notice if we listed more than 24 channels * - usual height of irc client in text mode. */ if (MyConnect(sptr) && (listedchannels > 24)) { sendto_one(sptr, ":%s NOTICE %s :%s", ME, parv[0], LIST_ALIS_NOTE); } #endif } ///////////// ここが3260行目です。 ////////////////// else { parv[1] = canonize(parv[1]); for (; (name = strtoken(&p, parv[1], ",")); parv[1] = NULL) { chptr = find_channel(name, NullChn); if (chptr && ShowChannel(sptr, chptr) && sptr->user) { rlen += sendto_one(sptr, rpl_str(RPL_LIST, parv[0]), chptr->chname, chptr->users, chptr->topic); if (!MyConnect(sptr) && rlen > CHREPLLEN) break; } if (*name == '!') { chptr = NULL; while (chptr=hash_find_channels(name+1, chptr)) { int scr = SecretChannel(chptr) && !IsMember(sptr, chptr); rlen += sendto_one(sptr, rpl_str(RPL_LIST, parv[0]), chptr->chname, (scr) ? -1 : chptr->users, (scr) ? "" : chptr->topic); if (!MyConnect(sptr) && rlen > CHREPLLEN) break; } } } } if (!MyConnect(sptr) && rlen > CHREPLLEN) sendto_one(sptr, err_str(ERR_TOOMANYMATCHES, parv[0]), !BadPtr(parv[1]) ? parv[1] : "*"); sendto_one(sptr, rpl_str(RPL_LISTEND, parv[0])); return 2; } aClientはClientのstructで、Clientのstructは以下のようになっています。 struct Client { struct Client *next,*prev, *hnext; anUser *user; /* ...defined, if this is a User */ aServer *serv; /* ...defined, if this is a server */ aService *service; u_int hashv; /* raw hash value */ long flags; /* client flags */ aClient *from; /* == self, if Local Client, *NEVER* NULL! */ int fd; /* >= 0, for local clients */ int hopcount; /* number of servers to this 0 = local */ short status; /* Client type */ char name[HOSTLEN+1]; /* Unique name of the client, nick or host */ char username[USERLEN+1]; /* username here now for auth stuff */ char *info; /* Free form additional client information */ /* ** The following fields are allocated only for local clients ** (directly connected to *this* server with a socket. ** The first of them *MUST* be the "count"--it is the field ** to which the allocation is tied to! *Never* refer to ** these fields, if (from != self). */ int count; /* Amount of data in buffer */ char buffer[BUFSIZE]; /* Incoming message buffer */ #ifdef ZIP_LINKS aZdata *zip; /* zip data */ #endif short lastsq; /* # of 2k blocks when sendqueued called last*/ dbuf sendQ; /* Outgoing message queue--if socket full */ dbuf recvQ; /* Hold for data incoming yet to be parsed */ long sendM; /* Statistics: protocol messages send */ long sendK; /* Statistics: total k-bytes send */ long receiveM; /* Statistics: protocol messages received */ long receiveK; /* Statistics: total k-bytes received */ u_short sendB; /* counters to count upto 1-k lots of bytes */ u_short receiveB; /* sent and received. */ time_t lasttime; /* last time we received data */ time_t firsttime; /* time client was created */ time_t since; /* last time we parsed something */ aClient *acpt; /* listening client which we accepted from */ Link *confs; /* Configuration record associated */ int authfd; /* fd for rfc931 authentication */ char *auth; u_short port; /* and the remote port# too */ struct IN_ADDR ip; /* keep real ip# too */ struct hostent *hostp; char sockhost[HOSTLEN+1]; /* This is the host name from the socket ** and after which the connection was ** accepted. */ char passwd[PASSWDLEN+1]; char *reason; /* internal quit reason */ char exitc; }; 足りない情報などありましたらよろしくお願い致します。 長文失礼しました。 | ||||
|
投稿日時: 2006-07-05 17:47
end_of_list:
#ifdef LIST_ALIS_NOTE この部分を #ifdef LIST_ALIS_NOTE end_of_list: に書き換えたらコンパイル通りませんか? |
1