>From amsnplus.tcl line 568: if { $userLogin != "" } { set loginList [list $userLogin] } else { set loginList [array names nickArray] } foreach login $loginList { ## Parsing here }
These lines will make your plugin work for offline people... We go back to the chat we had with NWM on IRC... I call only once the event for the initial set of the nickname array to save some performances because the event system is quite heavy : it means post the event which will iterate through a list to call all plugin which registered the event and thus for each contact... Currently when setting the nickname array for the first time, I avoid to iterate the plugins procedure list n-1 times and I avoid useless calls (don't forget that calling a function means store context etc....) Anyway I agree with NWM that the resulting code in plugins is quite ugly especially in aMSNPlus... :s Phil P.S. I know that the code is ugly in aMSNPlus but please look at this procedure as it's like a reference code for how to deal with newCL formatting system... (I never said it is a reference for parsing system :p) NoWhereMan a écrit : > ----- Original Message ----- > From: square87 > To: Mailing list for developers and everyone helping AMSN > Sent: Friday, March 23, 2007 8:43 PM > Subject: Re: [Amsn-devel] Colorednicks plugin > > >> Hello Phil. >> I didn't use NickArray because i said "it is only work for connected >> people", >> so i created a new event... but i saw that there is maybe a little wrong >> thing. >> Check this diff. With this diff also offline contacts can be used by >> NickArray event. >> Is this diff correct? With this diff if i use NickArray all contact are >> parsed, >> without this only connected contact. >> You can also check with amsnplus. > > NickArray is called also when contacts sign in; in this case the array will > contain only one contact > > bye > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Amsn-devel mailing list > Amsn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amsn-devel > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel