JadedCtrl / Chat-O-Matic

A multi-protocol chat program for Haiku
Other
15 stars 3 forks source link

(irc) Send command output to current room (rather than sys buffer) #3

Open JadedCtrl opened 3 years ago

JadedCtrl commented 3 years ago

When a command is sent from the app to an add-on, the sending chat_id is included in the message. This can be used to send command output to the appropriate room, instead of defaulting to the system buffer.

Here's what I'm thinking: two variables, fLastCommand and fCommandRoom, listing the command's string and output room, respectively. A helper function should be able to take fLastCommand in ProcessNumerics() and return if the command is related to the current numeric or not. If yes, print to the fCommandRoom, rather than system buffer. If it's a numeric signifying the end of a message (e.g., RPL_ENDOFWHOIS), then fLastCommand and fCommandRoom are cleared.