Skip to content

Commit 35d245c

Browse files
add todo
1 parent cc5397e commit 35d245c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

xdcc/xdcc.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,14 @@ func DCCSend(hook *webircgateway.HookIrcLine) {
202202
parts.receiverNick = client.IrcState.Nick
203203
parts.senderNick = m.Prefix.Nick
204204
parts.serverHostname = client.UpstreamConfig.Hostname
205+
206+
//TODO when wfile has no extension PARTS file
205207
lastIndex := strings.LastIndex(parts.file,".")
208+
209+
206210
parts.file = slug.Make(parts.receiverNick + strings.ReplaceAll(parts.serverHostname, ".", "_") + parts.senderNick + parts.file[0:lastIndex]) + parts.file[lastIndex:len(parts.file)] //long URLs may not work
207-
hook.Message.Command = "NOTICE"
211+
212+
hook.Message.Command = "NOTICE"
208213
hook.Message.Params[1] = fmt.Sprintf("http://%s:3000/%s",configs.DomainName, parts.file)
209214

210215
_, ok := configs.server.fileNames[parts.file]

0 commit comments

Comments
 (0)