25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

* src/mod_irc/mod_irc_connection.erl: Added filtering of quit

status

* src/web/ejabberd_web_admin.erl: Copyright update
* src/mod_vcard_ldap.erl: Likewise
* src/mod_vcard.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/mod_muc/mod_muc.erl: Likewise
* src/mod_irc/mod_irc.erl: Likewise

SVN Revision: 296
This commit is contained in:
Alexey Shchepin 2005-01-13 23:04:47 +00:00
parent 3416cbe63a
commit 36afafb9e6
8 changed files with 47 additions and 77 deletions

View File

@ -1,3 +1,17 @@
2005-01-14 Alexey Shchepin <alexey@sevcom.net>
* src/mod_irc/mod_irc_connection.erl: Added filtering of quit
status
2005-01-04 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_web_admin.erl: Copyright update
* src/mod_vcard_ldap.erl: Likewise
* src/mod_vcard.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/mod_muc/mod_muc.erl: Likewise
* src/mod_irc/mod_irc.erl: Likewise
2004-12-30 Alexey Shchepin <alexey@sevcom.net>
* src/odbc/ejabberd_odbc.erl: Load-balance ODBC requests between

View File

@ -199,7 +199,7 @@ iq_get_vcard(Lang) ->
"http://ejabberd.jabberstudio.org/"}]},
{xmlelement, "DESC", [],
[{xmlcdata, translate:translate(Lang, "ejabberd IRC module\n"
"Copyright (c) 2003-2004 Alexey Shchepin")}]}].
"Copyright (c) 2003-2005 Alexey Shchepin")}]}].
process_register(From, To, #iq{} = IQ) ->
case catch process_irc_register(From, To, IQ) of

View File

@ -614,16 +614,7 @@ process_channel_list_user(StateData, Chan, User) ->
process_channel_topic(StateData, Chan, String) ->
FromUser = "someone",
{ok, Msg, _} = regexp:sub(String, ".*332[^:]*:", ""),
Msg1 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg),
Msg1 = filter_message(Msg),
ejabberd_router:route(
jlib:make_jid(
lists:concat([Chan, "%", StateData#state.server]),
@ -642,16 +633,7 @@ process_chanprivmsg(StateData, Chan, From, String) ->
_ ->
Msg
end,
Msg2 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg1),
Msg2 = filter_message(Msg1),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
StateData#state.myname, FromUser),
@ -670,16 +652,7 @@ process_channotice(StateData, Chan, From, String) ->
_ ->
Msg
end,
Msg2 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg1),
Msg2 = filter_message(Msg1),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
StateData#state.myname, FromUser),
@ -699,16 +672,7 @@ process_privmsg(StateData, Nick, From, String) ->
_ ->
Msg
end,
Msg2 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg1),
Msg2 = filter_message(Msg1),
ejabberd_router:route(
jlib:make_jid(lists:concat([FromUser, "!", StateData#state.server]),
StateData#state.myname, ""),
@ -726,16 +690,7 @@ process_notice(StateData, Nick, From, String) ->
_ ->
Msg
end,
Msg2 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg1),
Msg2 = filter_message(Msg1),
ejabberd_router:route(
jlib:make_jid(lists:concat([FromUser, "!", StateData#state.server]),
StateData#state.myname, ""),
@ -761,16 +716,7 @@ process_version(StateData, Nick, From) ->
process_topic(StateData, Chan, From, String) ->
[FromUser | _] = string:tokens(From, "!"),
{ok, Msg, _} = regexp:sub(String, ".*TOPIC[^:]*:", ""),
Msg1 = lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg),
Msg1 = filter_message(Msg),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
StateData#state.myname, FromUser),
@ -784,6 +730,7 @@ process_topic(StateData, Chan, From, String) ->
process_part(StateData, Chan, From, String) ->
[FromUser | FromIdent] = string:tokens(From, "!"),
{ok, Msg, _} = regexp:sub(String, ".*PART[^:]*", ""),
Msg1 = filter_message(Msg),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
StateData#state.myname, FromUser),
@ -791,7 +738,7 @@ process_part(StateData, Chan, From, String) ->
{xmlelement, "message", [{"type", "groupchat"}],
[{xmlelement, "body", [],
[{xmlcdata, "/me has part: " ++
Msg ++ "(" ++ FromIdent ++ ")" }]}]}),
Msg1 ++ "(" ++ FromIdent ++ ")" }]}]}),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
@ -804,7 +751,7 @@ process_part(StateData, Chan, From, String) ->
{"role", "none"}],
[]}]},
{xmlelement, "status", [],
[{xmlcdata, Msg ++ "(" ++ FromIdent ++ ")"}]}]
[{xmlcdata, Msg1 ++ "(" ++ FromIdent ++ ")"}]}]
}),
case catch dict:update(Chan,
fun(Ps) ->
@ -821,6 +768,7 @@ process_quit(StateData, From, String) ->
[FromUser | FromIdent] = string:tokens(From, "!"),
{ok, Msg, _} = regexp:sub(String, ".*QUIT[^:]*:", ""),
Msg1 = filter_message(Msg),
NewChans =
dict:map(
fun(Chan, Ps) ->
@ -834,7 +782,7 @@ process_quit(StateData, From, String) ->
{xmlelement, "message", [{"type", "groupchat"}],
[{xmlelement, "body", [],
[{xmlcdata, "/me has quit: " ++
Msg ++ "(" ++ FromIdent ++ ")" }]}]}),
Msg1 ++ "(" ++ FromIdent ++ ")" }]}]}),
ejabberd_router:route(
jlib:make_jid(
@ -848,7 +796,7 @@ process_quit(StateData, From, String) ->
{"role", "none"}],
[]}]},
{xmlelement, "status", [],
[{xmlcdata, Msg ++ "(" ++ FromIdent ++ ")"}]}
[{xmlcdata, Msg1 ++ "(" ++ FromIdent ++ ")"}]}
]}),
remove_element(FromUser, Ps);
_ ->
@ -874,6 +822,7 @@ process_join(StateData, Channel, From, String) ->
{xmlelement, "status", [],
[{xmlcdata, FromIdent}]}]}),
{ok, Msg, _} = regexp:sub(String, ".*JOIN[^:]*:", ""),
Msg1 = filter_message(Msg),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
StateData#state.myname, FromUser),
@ -881,7 +830,7 @@ process_join(StateData, Channel, From, String) ->
{xmlelement, "message", [{"type", "groupchat"}],
[{xmlelement, "body", [],
[{xmlcdata, "/me has joined " ++
Msg ++ "(" ++ FromIdent ++ ")" }]}]}),
Msg1 ++ "(" ++ FromIdent ++ ")" }]}]}),
case catch dict:update(Chan,
fun(Ps) ->
@ -1058,7 +1007,14 @@ process_admin(StateData, Channel, Nick, Affiliation, Role, Reason) ->
filter_message(Msg) ->
lists:filter(
fun(C) ->
if (C < 32) and
(C /= 9) and
(C /= 10) and
(C /= 13) ->
false;
true -> true
end
end, Msg).

View File

@ -444,7 +444,7 @@ iq_get_vcard(Lang) ->
"http://ejabberd.jabberstudio.org/"}]},
{xmlelement, "DESC", [],
[{xmlcdata, translate:translate(Lang, "ejabberd MUC module\n"
"Copyright (c) 2003-2004 Alexey Shchepin")}]}].
"Copyright (c) 2003-2005 Alexey Shchepin")}]}].
broadcast_service_message(Msg) ->

View File

@ -390,7 +390,7 @@ iq_get_vcard(Lang) ->
[{xmlcdata, translate:translate(
Lang,
"ejabberd pub/sub module\n"
"Copyright (c) 2003-2004 Alexey Shchepin")}]}].
"Copyright (c) 2003-2005 Alexey Shchepin")}]}].
iq_pubsub(Host, From, Type, SubEl) ->

View File

@ -126,7 +126,7 @@ process_local_iq(_From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ)
translate:translate(
Lang,
"Erlang Jabber Server\n"
"Copyright (c) 2002-2004 Alexey Shchepin")}]},
"Copyright (c) 2002-2005 Alexey Shchepin")}]},
{xmlelement, "BDAY", [],
[{xmlcdata, "2002-11-16"}]}
]}]}
@ -390,7 +390,7 @@ iq_get_vcard(Lang) ->
[{xmlcdata, translate:translate(
Lang,
"ejabberd vCard module\n"
"Copyright (c) 2003-2004 Alexey Shchepin")}]}].
"Copyright (c) 2003-2005 Alexey Shchepin")}]}].
find_xdata_el({xmlelement, _Name, _Attrs, SubEls}) ->
find_xdata_el1(SubEls).

View File

@ -86,7 +86,7 @@ process_local_iq(_From, _To, #iq{type = Type, lang = Lang, sub_el = SubEl} = IQ)
translate:translate(
Lang,
"Erlang Jabber Server\n"
"Copyright (c) 2002-2004 Alexey Shchepin")}]},
"Copyright (c) 2002-2005 Alexey Shchepin")}]},
{xmlelement, "BDAY", [],
[{xmlcdata, "2002-11-16"}]}
]}]}
@ -361,7 +361,7 @@ iq_get_vcard(Lang) ->
[{xmlcdata, translate:translate(
Lang,
"ejabberd vCard module\n"
"Copyright (c) 2003-2004 Alexey Shchepin")}]}].
"Copyright (c) 2003-2005 Alexey Shchepin")}]}].
find_xdata_el({xmlelement, _Name, _Attrs, SubEls}) ->
find_xdata_el1(SubEls).

View File

@ -119,7 +119,7 @@ make_xhtml(Els, Lang) ->
[?XE("tbody",
[?XE("tr",
[?XCT("td",
"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One")
"ejabberd (c) 2002-2005 Alexey Shchepin, 2004 Process One")
])])
])])])])])])
]}}.