-
Notifications
You must be signed in to change notification settings - Fork 372
Add -out parameter to /CAT #1023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
btw, /exec -o cat |
this is confusing because of the name -out, maybe use "-window" or such? |
Is this intended to write to the channel publicly as Also I don't want to bikeshed but Ironically -current, which #1024 removes, would make it consistent with /echo (unchangeable default behavior aside) |
-window is used for various purposes, /exec -window sends the output to active window for instance without argument while /echo -window takes an argument. /exec -out sends the output as a msg to the active window which we might not want to mix into this |
Oh, okay, then you probably want to fix the help text which has the same wording as /exec -out |
Sounds fine to me |
g_io_channel_set_encoding(handle, NULL, NULL); | ||
g_io_channel_seek_position(handle, fpos, G_SEEK_SET, NULL); | ||
buf = g_string_sized_new(512); | ||
while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) { | ||
buf->str[tpos] = '\0'; | ||
printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP | | ||
printtext(NULL, target, MSGLEVEL_CLIENTCRAP | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if -window is given, this should also include server
instead of NULL afaik
really, only use "server" if the flag is given. Otherwise the printtext would curiously end up in the server window of the active item instead of the status window |
@vague666 please rebase this and then we can merge it |
Change flag to -window Updated help Typo call printtext with server Only use server when target is not NULL
No description provided.