From: Fred <gad...@us...> - 2004-08-30 14:17:40
|
Update of /cvsroot/amsn/msn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8178/msn Modified Files: groups.tcl Log Message: Now check if a contact is already blocked/unblocked when blocking/unblocking a group Index: groups.tcl =================================================================== RCS file: /cvsroot/amsn/msn/groups.tcl,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** groups.tcl 30 Aug 2004 08:14:39 -0000 1.49 --- groups.tcl 30 Aug 2004 14:17:29 -0000 1.50 *************** *** 172,182 **** set timer 0 foreach user_login [::abook::getAllContacts] { ! #Get the group for each contact ! foreach gp [::abook::getContactData $user_login group] { ! #If the group is the same at specified, block the user ! if {$gp == $gid} { ! set name [::abook::getNick ${user_login}] ! after $timer [list ::MSN::blockUser ${user_login} [urlencode $name]] ! set timer [expr $timer + 250] } } --- 172,185 ---- set timer 0 foreach user_login [::abook::getAllContacts] { ! #If the contact is not already blocked ! if { [lsearch [::abook::getLists $user_login] BL] == -1} { ! #Get the group for each contact ! foreach gp [::abook::getContactData $user_login group] { ! #If the group is the same at specified, block the user ! if {$gp == $gid} { ! set name [::abook::getNick ${user_login}] ! after $timer [list ::MSN::blockUser ${user_login} [urlencode $name]] ! set timer [expr $timer + 250] ! } } } *************** *** 189,200 **** set timer 0 foreach user_login [::abook::getAllContacts] { ! #Get the group for each contact ! foreach gp [::abook::getContactData $user_login group] { ! #Compare if the group of the user is the same that the group requested to be blocked ! if {$gp == $gid} { ! #If yes, block the user ! set name [::abook::getNick ${user_login}] ! after $timer [list ::MSN::unblockUser ${user_login} [urlencode $name]] ! set timer [expr $timer + 250] } } --- 192,206 ---- set timer 0 foreach user_login [::abook::getAllContacts] { ! #If the contact is blocked ! if { [lsearch [::abook::getLists $user_login] BL] != -1} { ! #Get the group for each contact ! foreach gp [::abook::getContactData $user_login group] { ! #Compare if the group of the user is the same that the group requested to be blocked ! if {$gp == $gid} { ! #If yes, unblock the user ! set name [::abook::getNick ${user_login}] ! after $timer [list ::MSN::unblockUser ${user_login} [urlencode $name]] ! set timer [expr $timer + 250] ! } } } |