Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
204
Issues
204
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
073972a5
Commit
073972a5
authored
Jan 04, 2011
by
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ask for NO history message when using /cycle
parent
81e71fee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
src/core.py
src/core.py
+3
-3
src/multiuserchat.py
src/multiuserchat.py
+6
-5
src/tabs.py
src/tabs.py
+2
-2
No files found.
src/core.py
View file @
073972a5
...
...
@@ -1004,7 +1004,7 @@ class Core(object):
if
muc_serv_list
:
the_input
.
auto_completion
(
muc_serv_list
,
' '
)
def
command_join
(
self
,
arg
):
def
command_join
(
self
,
arg
,
histo_length
=
None
):
"""
/join [room][/nick] [password]
"""
...
...
@@ -1051,10 +1051,10 @@ class Core(object):
return
room
=
room
.
lower
()
if
r
and
not
r
.
joined
:
muc
.
join_groupchat
(
self
.
xmpp
,
room
,
nick
,
password
)
muc
.
join_groupchat
(
self
.
xmpp
,
room
,
nick
,
password
,
histo_length
)
if
not
r
:
# if the room window exists, we don't recreate it.
self
.
open_new_room
(
room
,
nick
)
muc
.
join_groupchat
(
self
.
xmpp
,
room
,
nick
,
password
)
muc
.
join_groupchat
(
self
.
xmpp
,
room
,
nick
,
password
,
histo_length
)
else
:
r
.
own_nick
=
nick
r
.
users
=
[]
...
...
src/multiuserchat.py
View file @
073972a5
...
...
@@ -22,6 +22,9 @@ import sleekxmpp
from
xml.etree
import
cElementTree
as
ET
import
logging
log
=
logging
.
getLogger
(
__name__
)
def
send_private_message
(
xmpp
,
jid
,
line
):
"""
Send a private message
...
...
@@ -60,11 +63,9 @@ def change_nick(xmpp, jid, nick):
"""
xmpp
.
make_presence
(
pto
=
'%s/%s'
%
(
jid
,
nick
)).
send
()
def
join_groupchat
(
xmpp
,
jid
,
nick
,
passwd
=
''
):
"""
Join the groupchat
"""
xmpp
.
plugin
[
'xep_0045'
].
joinMUC
(
jid
,
nick
,
maxhistory
=
None
,
password
=
passwd
)
def
join_groupchat
(
xmpp
,
jid
,
nick
,
passwd
=
''
,
maxhistory
=
None
):
log
.
debug
(
'ALLO histo: %s
\n
'
%
maxhistory
)
xmpp
.
plugin
[
'xep_0045'
].
joinMUC
(
jid
,
nick
,
maxhistory
=
maxhistory
,
password
=
passwd
)
def
leave_groupchat
(
xmpp
,
jid
,
own_nick
,
msg
):
"""
...
...
src/tabs.py
View file @
073972a5
...
...
@@ -379,7 +379,7 @@ class MucTab(ChatTab):
if
self
.
get_room
().
joined
:
muc
.
leave_groupchat
(
self
.
core
.
xmpp
,
self
.
get_name
(),
self
.
get_room
().
own_nick
,
arg
)
self
.
get_room
().
joined
=
False
self
.
core
.
command_join
(
'/'
)
self
.
core
.
command_join
(
'/'
,
"0"
)
def
command_recolor
(
self
,
arg
):
"""
...
...
@@ -396,7 +396,7 @@ class MucTab(ChatTab):
nb_color
=
len
(
theme
.
LIST_COLOR_NICKNAMES
)
for
user
in
sorted
(
users
,
key
=
compare_users
,
reverse
=
True
):
user
.
color
=
theme
.
LIST_COLOR_NICKNAMES
[
i
%
nb_color
]
i
+=
1
i
+=
1
self
.
text_win
.
rebuild_everything
(
self
.
get_room
())
self
.
core
.
refresh_window
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment