- Timestamp:
- Jun 23, 2021, 4:17:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r560 r562 1906 1906 Params: params, 1907 1907 }) 1908 case "PRIVMSG" :1908 case "PRIVMSG", "NOTICE": 1909 1909 var targetsStr, text string 1910 1910 if err := parseMessageParams(msg, &targetsStr, &text); err != nil { … … 1919 1919 } 1920 1920 1921 if casemapASCII(name) == serviceNickCM {1921 if msg.Command == "PRIVMSG" && casemapASCII(name) == serviceNickCM { 1922 1922 if dc.caps["echo-message"] { 1923 1923 echoTags := tags.Copy() … … 1926 1926 Tags: echoTags, 1927 1927 Prefix: dc.prefix(), 1928 Command: "PRIVMSG",1928 Command: msg.Command, 1929 1929 Params: []string{name, text}, 1930 1930 }) … … 1939 1939 } 1940 1940 1941 if uc.network.casemap(upstreamName) == "nickserv" {1941 if msg.Command == "PRIVMSG" && uc.network.casemap(upstreamName) == "nickserv" { 1942 1942 dc.handleNickServPRIVMSG(uc, text) 1943 1943 } … … 1949 1949 uc.SendMessageLabeled(dc.id, &irc.Message{ 1950 1950 Tags: tags, 1951 Command: "PRIVMSG",1951 Command: msg.Command, 1952 1952 Params: []string{upstreamName, unmarshaledText}, 1953 1953 }) … … 1964 1964 User: uc.username, 1965 1965 }, 1966 Command: "PRIVMSG",1966 Command: msg.Command, 1967 1967 Params: []string{upstreamName, text}, 1968 1968 } 1969 1969 uc.produce(upstreamName, echoMsg, dc) 1970 1971 uc.updateChannelAutoDetach(upstreamName)1972 }1973 case "NOTICE":1974 var targetsStr, text string1975 if err := parseMessageParams(msg, &targetsStr, &text); err != nil {1976 return err1977 }1978 tags := copyClientTags(msg.Tags)1979 1980 for _, name := range strings.Split(targetsStr, ",") {1981 uc, upstreamName, err := dc.unmarshalEntity(name)1982 if err != nil {1983 return err1984 }1985 1986 unmarshaledText := text1987 if uc.isChannel(upstreamName) {1988 unmarshaledText = dc.unmarshalText(uc, text)1989 }1990 uc.SendMessageLabeled(dc.id, &irc.Message{1991 Tags: tags,1992 Command: "NOTICE",1993 Params: []string{upstreamName, unmarshaledText},1994 })1995 1970 1996 1971 uc.updateChannelAutoDetach(upstreamName)
Note:
See TracChangeset
for help on using the changeset viewer.