mirror of
https://github.com/fluffle/goirc
synced 2025-07-01 02:53:53 +00:00
Fix comments and my poor code-reading skills. Damn you StalkR :-)
This commit is contained in:
parent
2c5b477233
commit
d6cb0bb026
2 changed files with 22 additions and 9 deletions
|
@ -30,16 +30,10 @@ const (
|
|||
WHOIS = "WHOIS"
|
||||
)
|
||||
|
||||
// this file contains the various commands you can
|
||||
// send to the server using an Conn connection
|
||||
|
||||
// This could be a lot less ugly with the ability to manipulate
|
||||
// the symbol table and add methods/functions on the fly
|
||||
// [ CMD, FMT, FMTARGS ] etc.
|
||||
|
||||
// cutNewLines() pares down a string to the part before the first "\r" or "\n"
|
||||
func cutNewLines(s string) string {
|
||||
r := strings.SplitN(s, "\\r", 2)
|
||||
r = strings.SplitN(r[0], "\\n", 2)
|
||||
r := strings.SplitN(s, "\r", 2)
|
||||
r = strings.SplitN(r[0], "\n", 2)
|
||||
return r[0]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue