Changeset 268 in code for trunk/downstream.go
- Timestamp:
- Apr 24, 2020, 4:26:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r262 r268 198 198 } 199 199 return conn, name, nil 200 } 201 202 func (dc *downstreamConn) unmarshalText(uc *upstreamConn, text string) string { 203 if dc.upstream() != nil { 204 return text 205 } 206 // TODO: smarter parsing that ignores URLs 207 return strings.ReplaceAll(text, "/"+uc.network.GetName(), "") 200 208 } 201 209 … … 1234 1242 } 1235 1243 1244 unmarshaledText := text 1245 if uc.isChannel(upstreamName) { 1246 unmarshaledText = dc.unmarshalText(uc, text) 1247 } 1236 1248 uc.SendMessage(&irc.Message{ 1237 1249 Command: "PRIVMSG", 1238 Params: []string{upstreamName, text},1250 Params: []string{upstreamName, unmarshaledText}, 1239 1251 }) 1240 1252 … … 1262 1274 } 1263 1275 1276 unmarshaledText := text 1277 if uc.isChannel(upstreamName) { 1278 unmarshaledText = dc.unmarshalText(uc, text) 1279 } 1264 1280 uc.SendMessage(&irc.Message{ 1265 1281 Command: "NOTICE", 1266 Params: []string{upstreamName, text},1282 Params: []string{upstreamName, unmarshaledText}, 1267 1283 }) 1268 1284 }
Note:
See TracChangeset
for help on using the changeset viewer.