Closed eazar001 closed 9 years ago
Addition of priv_msg/2
to utilities.pl
allows one to send private messages without having to go through send_msg/3
. This also handles newlines. Just to keep it simple newlines within the context of this predicate means \n
. In the interest of keeping the semantics clear and seperate from prolog IO predicates like format/3, etc. .... I will not be giving the ~n
sequence any special treatment.
Example:
?- priv_msg("test message\nnewline", "##prolog")
Output:
yesbot | test message
yesbot | newline
crlf is converted to \n when reading/writing text mode in prolog by definition. In effect prolog internally is 'always unix'
Although this is possible by threading together multiple instances of this predicate, it's not as abstract as one would desire. I should design something to make this more convenient for the future.