Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel Brötzmann
gajim
Commits
98256475
Commit
98256475
authored
21 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
small changes
parent
d9f5bd08
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/core.py
+16
-13
16 additions, 13 deletions
core/core.py
plugins/gtkgui/gtkgui.py
+5
-2
5 additions, 2 deletions
plugins/gtkgui/gtkgui.py
plugins/logger/logger.py
+7
-4
7 additions, 4 deletions
plugins/logger/logger.py
with
28 additions
and
19 deletions
core/core.py
+
16
−
13
View file @
98256475
...
...
@@ -66,6 +66,8 @@ def presenceCB(self, con, prs):
log
.
debug
(
"
subscribe request from %s
"
%
who
)
if
self
.
cfgParser
.
Core_alwaysauth
==
1
or
string
.
find
(
who
,
"
@
"
)
<=
0
:
self
.
con
.
send
(
common
.
jabber
.
Presence
(
who
,
'
subscribed
'
))
if
string
.
find
(
who
,
"
@
"
)
<=
0
:
self
.
hub
.
sendPlugin
(
'
NOTIFY
'
,
(
who
,
'
offline
'
,
'
offline
'
))
else
:
self
.
hub
.
sendPlugin
(
'
SUBSCRIBE
'
,
who
)
elif
type
==
'
subscribed
'
:
...
...
@@ -205,20 +207,21 @@ def mainLoop(self):
def
loadPlugins
(
gc
):
modStr
=
gc
.
cfgParser
.
Core_modules
mods
=
string
.
split
(
modStr
,
'
'
)
if
modStr
:
mods
=
string
.
split
(
modStr
,
'
'
)
for
mod
in
mods
:
modObj
=
gc
.
hub
.
newPlugin
(
mod
)
gc
.
hub
.
register
(
mod
,
'
ROSTER
'
)
gc
.
hub
.
register
(
mod
,
'
NOTIFY
'
)
gc
.
hub
.
register
(
mod
,
'
MSG
'
)
gc
.
hub
.
register
(
mod
,
'
SUBSCRIBED
'
)
gc
.
hub
.
register
(
mod
,
'
SUBSCRIBE
'
)
gc
.
hub
.
register
(
mod
,
'
AGENTS
'
)
gc
.
hub
.
register
(
mod
,
'
AGENT_INFO
'
)
gc
.
hub
.
register
(
mod
,
'
QUIT
'
)
gc
.
hub
.
register
(
mod
,
'
ACC_OK
'
)
modObj
.
load
()
for
mod
in
mods
:
modObj
=
gc
.
hub
.
newPlugin
(
mod
)
gc
.
hub
.
register
(
mod
,
'
ROSTER
'
)
gc
.
hub
.
register
(
mod
,
'
NOTIFY
'
)
gc
.
hub
.
register
(
mod
,
'
MSG
'
)
gc
.
hub
.
register
(
mod
,
'
SUBSCRIBED
'
)
gc
.
hub
.
register
(
mod
,
'
SUBSCRIBE
'
)
gc
.
hub
.
register
(
mod
,
'
AGENTS
'
)
gc
.
hub
.
register
(
mod
,
'
AGENT_INFO
'
)
gc
.
hub
.
register
(
mod
,
'
QUIT
'
)
gc
.
hub
.
register
(
mod
,
'
ACC_OK
'
)
modObj
.
load
()
# END loadPLugins
def
start
():
...
...
This diff is collapsed.
Click to expand it.
plugins/gtkgui/gtkgui.py
+
5
−
2
View file @
98256475
...
...
@@ -798,7 +798,7 @@ def read_queue(self):
user1
=
user
(
jid
,
jid
,
[
'
Agents
'
],
ev
[
1
][
1
],
ev
[
1
][
2
],
'
from
'
)
iterU
=
self
.
r
.
treestore
.
append
(
self
.
r
.
l_group
[
'
Agents
'
],
\
(
self
.
r
.
pixbufs
[
ev
[
1
][
1
]],
jid
,
'
agent
'
,
FALSE
,
\
self
.
userbgcolor
,
TRUE
))
self
.
r
.
userbgcolor
,
TRUE
))
self
.
r
.
l_contact
[
jid
]
=
{
'
user
'
:
user1
,
'
iter
'
:[
iterU
]}
else
:
#Update existing line
...
...
@@ -857,7 +857,10 @@ def read_queue(self):
if
Wbrowser
:
Wbrowser
.
agents
(
ev
[
1
])
elif
ev
[
0
]
==
'
AGENT_INFO
'
:
Wreg
=
agent_reg
(
ev
[
1
][
0
],
ev
[
1
][
1
],
self
.
r
)
if
not
ev
[
1
][
1
].
has_key
(
'
instructions
'
):
warning
(
'
error contacting %s
'
%
ev
[
1
][
0
])
else
:
Wreg
=
agent_reg
(
ev
[
1
][
0
],
ev
[
1
][
1
],
self
.
r
)
#('ACC_OK', (hostname, login, pasword, name, ressource))
elif
ev
[
0
]
==
'
ACC_OK
'
:
print
"
acc_ok
"
...
...
This diff is collapsed.
Click to expand it.
plugins/logger/logger.py
+
7
−
4
View file @
98256475
...
...
@@ -49,6 +49,7 @@ def read_queue(self):
return
elif
ev
[
0
]
==
'
NOTIFY
'
:
status
=
ev
[
1
][
2
]
jid
=
string
.
split
(
ev
[
1
][
0
],
'
/
'
)[
0
]
if
not
status
:
status
=
""
if
lognotsep
==
1
:
...
...
@@ -57,16 +58,18 @@ def read_queue(self):
ev
[
1
][
1
],
status
))
fic
.
close
()
if
lognotusr
==
1
:
fic
=
open
(
LOGPATH
+
ev
[
1
][
0
]
,
"
a
"
)
fic
.
write
(
"
%s:%s:%s:%s
\n
"
%
(
tim
,
ev
[
1
][
0
]
,
\
fic
=
open
(
LOGPATH
+
jid
,
"
a
"
)
fic
.
write
(
"
%s:%s:%s:%s
\n
"
%
(
tim
,
jid
,
\
ev
[
1
][
1
],
status
))
fic
.
close
()
elif
ev
[
0
]
==
'
MSG
'
:
fic
=
open
(
LOGPATH
+
ev
[
1
][
0
],
"
a
"
)
jid
=
string
.
split
(
ev
[
1
][
0
],
'
/
'
)[
0
]
fic
=
open
(
LOGPATH
+
jid
,
"
a
"
)
fic
.
write
(
"
%s:recv:%s
\n
"
%
(
tim
,
ev
[
1
][
1
]))
fic
.
close
()
elif
ev
[
0
]
==
'
MSGSENT
'
:
fic
=
open
(
LOGPATH
+
ev
[
1
][
0
],
"
a
"
)
jid
=
string
.
split
(
ev
[
1
][
0
],
'
/
'
)[
0
]
fic
=
open
(
LOGPATH
+
jid
,
"
a
"
)
fic
.
write
(
"
%s:sent:%s
\n
"
%
(
tim
,
ev
[
1
][
1
]))
fic
.
close
()
time
.
sleep
(
0.5
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment