Changeset 516 in code for trunk/irc.go
- Timestamp:
- May 18, 2021, 8:44:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/irc.go
r498 r516 5 5 "sort" 6 6 "strings" 7 "time" 7 8 "unicode" 8 9 "unicode/utf8" … … 638 639 } 639 640 } 641 642 // parseChatHistoryBound parses the given CHATHISTORY parameter as a bound. 643 // The zero time is returned on error. 644 func parseChatHistoryBound(param string) time.Time { 645 parts := strings.SplitN(param, "=", 2) 646 if len(parts) != 2 { 647 return time.Time{} 648 } 649 switch parts[0] { 650 case "timestamp": 651 timestamp, err := time.Parse(serverTimeLayout, parts[1]) 652 if err != nil { 653 return time.Time{} 654 } 655 return timestamp 656 default: 657 return time.Time{} 658 } 659 }
Note:
See TracChangeset
for help on using the changeset viewer.