Save Your status

It's a small patch that saves Your status changes into a file. After reboot of Your client You'll have Your last status.

Index: presence.tcl
===================================================================
RCS file: /home/cvs/tkabber/tkabber/presence.tcl,v
retrieving revision 1.65
diff -r1.65 presence.tcl
282,283c282,283
< set userstatus available
< set curtextstatus [set textstatus ""]
---
> set userstatus $userstatus
> set curtextstatus [set textstatus $textstatus]
363c363,366
< 
---
>           set newstatus $userstatus
>           set newtextstatus $textstatus
>           set newpriority $userpriority
428a432,434
>     set plik [open "/home/szary/.tkabber/moj_status" w]
>     puts $plik "$newstatus $newtextstatus"
>     close $plik

In Your config You have to change some lines:

global textstatus
global userstatus
set plik [open "/home/szary/.tkabber/moj_status" r]
set linia [gets $plik]
set userstatus [lindex $linia 0]
set textstatus [concat [lrange $linia 1 end]]

proc postload{} {
...
}

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

in config.tcl: global

in config.tcl:

global user
set user "username"

and in presence.tcl:

Index: presence.tcl
===================================================================
RCS file: /home/cvs/tkabber/tkabber/presence.tcl,v
retrieving revision 1.65
diff -r1.65 presence.tcl
1c1
< # $Id: presence.tcl,v 1.65 2005/11/20 01:09:37 aleksey Exp $
---
> # $Id: presence.tcl,v 1.3 2005/12/05 19:36:29 szary Exp $
282,283c282,285
< set userstatus available
< set curtextstatus [set textstatus ""]
---
> set plik [open "/home/$user/.tkabber/moj_status" r]
> set linia [gets $plik]
> set userstatus [lindex $linia 0]
> set curtextstatus [set textstatus [concat [lrange $linia 1 end]]]
349c351
<     global statusdesc userstatusdesc
---
>     global statusdesc userstatusdesc user
362a365,367
>           set newstatus $userstatus
>           set newtextstatus $textstatus
>           set newpriority $userpriority
428a434,436
>     set plik [open "/home/$user/.tkabber/moj_status" w]
>     puts $plik "$newstatus $newtextstatus"
>     close $plik
Syndicate content