hyudai28 / ft_irc

0 stars 0 forks source link

[NEW]Serverでユーザーごとのコマンドを検知して実行する関数を作る。 #31

Closed hyudai28 closed 1 year ago

hyudai28 commented 1 year ago

[NEW]Serverでユーザーごとのコマンドを検知して実行する関数を作る。

コマンドを実行するのはおそらくServer側でやったほうが都合がいいので、Serverでユーザー全員を巡回してコマンドを実行する。

Comment

今回の対象に並列処理は含まない。シングルスレッドで順番に回してよいが、将来的に並列になることを頭の片隅に入れてほしい。

問題の内容・実装箇所

Serverクラスに新規実装。User.receiveの後に実装すること。

Labels

new

機能追加の要望や改善してほしいときに使う。
→ 実装したらクローズする

Milestone

10/31

Assignee

Issueを誰に割り当てるかを指定する。

関連するissue

10

28

資料

hyudai28 commented 1 year ago

check_state branchにつくります。 たぶんcheck_stateはでかくなるので、100行超えたら別ファイルに分けます。

hyudai28 commented 1 year ago

あーまだUserに情報入ってないのか

hyudai28 commented 1 year ago

最初に飛んでくる情報が NICK hy USER hy 8 * :hy ただNICKもUSERもコマンド

hyudai28 commented 1 year ago

NICKコマンドが呼び出されたときにUSER情報がなければreturn してもいいか

hyudai28 commented 1 year ago

じゃあなんでNICKが飛んできてんだ

hyudai28 commented 1 year ago
  Command: NICK

Parameters:

接続時にNICKが送られてきた場合ユーザー接続を許可しない。 しかしNICK/USER のペアで送られた場合はほかのサーバーにユーザーが参加したことを知らせる必要がある。 This form of the NICK message MUST NOT be allowed from user connections. However, it MUST be used instead of the NICK/USER pair to notify other servers of new users joining the IRC network. This message is really the combination of three distinct messages: NICK, USER and MODE [IRC-CLIENT]. The parameter is used by servers to indicate how far away a user is from its home server. A local connection has a hopcount of 0. The hopcount value is incremented by each passed server.
hyudai28 commented 1 year ago

NICK/USERで送られてくる場合どうする? NICKコマンドの中にUSERコマンドを呼び出す可能性を考える?