enhancements to roleplay

This commit is contained in:
Shivaram Lingamneni 2020-03-19 17:09:52 -04:00
parent 2bb36e6cb8
commit 2428acab95
5 changed files with 101 additions and 43 deletions

View file

@ -82,3 +82,10 @@ func (err *IncompatibleSchemaError) Error() string {
func NanoToTimestamp(nanotime int64) string {
return time.Unix(0, nanotime).UTC().Format(IRCv3TimestampFormat)
}
func BoolDefaultTrue(value *bool) bool {
if value != nil {
return *value
}
return true
}