From bc970507965a809727b3d5877884f21605fdf1a6 Mon Sep 17 00:00:00 2001 From: watcherhd Date: Sat, 26 Nov 2011 11:03:42 +0000 Subject: Project folders rename part 1 git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@210 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- BanControl/BETA | 1 + BanControl/CHANGELOG.txt | 30 + BanControl/LICENSE.txt | 339 ++++++++++ BanControl/README.txt | 68 ++ BanControl/TRANSLATION.txt | 21 + BanControl/common.arg | 63 ++ BanControl/inc/IcoLib.inc | 51 ++ BanControl/inc/m_clc.inc | 203 ++++++ BanControl/inc/m_clist.inc | 33 + BanControl/inc/m_database.inc | 60 ++ BanControl/inc/m_langpack.inc | 30 + BanControl/inc/m_metacontacts.inc | 149 +++++ BanControl/inc/m_options.inc | 36 ++ BanControl/inc/m_protocols.inc | 14 + BanControl/inc/m_protosvc.inc | 18 + BanControl/inc/m_updater.inc | 29 + BanControl/inc/newpluginapi.inc | 44 ++ BanControl/inc/statusmodes.inc | 26 + BanControl/plugin/BanControl.asm | 1160 +++++++++++++++++++++++++++++++++++ BanControl/plugin/BanControl.def | 4 + BanControl/res/BanControl.aps | Bin 0 -> 22384 bytes BanControl/res/BanControl.rc | 141 +++++ BanControl/res/ban.ico | Bin 0 -> 2550 bytes BanControl/res/resource.h | 19 + BanControl/vsproj/BanControl.sln | 21 + BanControl/vsproj/BanControl.vcproj | 147 +++++ BanControl/vsproj/Resource.txt | 0 BanControl/vsproj/build.bat | 34 + BanControl/vsproj/clean.bat | 49 ++ 29 files changed, 2790 insertions(+) create mode 100644 BanControl/BETA create mode 100644 BanControl/CHANGELOG.txt create mode 100644 BanControl/LICENSE.txt create mode 100644 BanControl/README.txt create mode 100644 BanControl/TRANSLATION.txt create mode 100644 BanControl/common.arg create mode 100644 BanControl/inc/IcoLib.inc create mode 100644 BanControl/inc/m_clc.inc create mode 100644 BanControl/inc/m_clist.inc create mode 100644 BanControl/inc/m_database.inc create mode 100644 BanControl/inc/m_langpack.inc create mode 100644 BanControl/inc/m_metacontacts.inc create mode 100644 BanControl/inc/m_options.inc create mode 100644 BanControl/inc/m_protocols.inc create mode 100644 BanControl/inc/m_protosvc.inc create mode 100644 BanControl/inc/m_updater.inc create mode 100644 BanControl/inc/newpluginapi.inc create mode 100644 BanControl/inc/statusmodes.inc create mode 100644 BanControl/plugin/BanControl.asm create mode 100644 BanControl/plugin/BanControl.def create mode 100644 BanControl/res/BanControl.aps create mode 100644 BanControl/res/BanControl.rc create mode 100644 BanControl/res/ban.ico create mode 100644 BanControl/res/resource.h create mode 100644 BanControl/vsproj/BanControl.sln create mode 100644 BanControl/vsproj/BanControl.vcproj create mode 100644 BanControl/vsproj/Resource.txt create mode 100644 BanControl/vsproj/build.bat create mode 100644 BanControl/vsproj/clean.bat (limited to 'BanControl') diff --git a/BanControl/BETA b/BanControl/BETA new file mode 100644 index 0000000..2643c8e --- /dev/null +++ b/BanControl/BETA @@ -0,0 +1 @@ +BanControl_v.0.0.1.0 \ No newline at end of file diff --git a/BanControl/CHANGELOG.txt b/BanControl/CHANGELOG.txt new file mode 100644 index 0000000..3e86a46 --- /dev/null +++ b/BanControl/CHANGELOG.txt @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////// +// Ban Control plugin for Miranda. Bans a contact for a specific time +// http://trac/BanControl/ +// Copyright (C) 2007 A. Chilaru (FlexLabs Inc. ) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////// + + [*] Feature/code/some other change + [!] Bugfix + [+] New feature + [-] Feature remove + [c] Comment + +0.1.0.0: 2007-01-10 + --- Skeleton upload + +Copyright (C) 2006 A. Chilaru (FlexLabs Inc. ) \ No newline at end of file diff --git a/BanControl/LICENSE.txt b/BanControl/LICENSE.txt new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/BanControl/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/BanControl/README.txt b/BanControl/README.txt new file mode 100644 index 0000000..9a9a14a --- /dev/null +++ b/BanControl/README.txt @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////// +// Ban Control plugin for Miranda. Bans a contact for a specific time +// http://trac/BanControl/ +// Copyright (C) 2007 A. Chilaru (FlexLabs Inc. ) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////// + +1. About +-------- +The Ban Control plugin allows you to ban (ignore) a certain contact for some time. Options like saving history etc coming soon. + +2. Features +----------- + - Banning a contact + +4. Todo +------- + Lots of stuff + +5. History +---------- + See CHANGELOG.txt + +6. Known issues +--------------- + None known + +7. Latest development version: +------------------------------ + You can download the latest developement version from here: + http://trac/BanControl/trunk/bin/ + Alternatively, you can download the latest source code on the project homepage: + http://trac/BanControl/browser + +8. Bugs +------- + - Before sending reports check if bugs are still present in the latest developement version + - and that such a bug hasn't been submitted earlier: + http://trac/BanControl/report/3 + - [English or Russian] You can send bug reports on the project homepage: + http://trac/BanControl/newticket + +9. Discussion & Feature Requests +-------------------------------- + - Request features, discuss plugin at Miranda IM forum thread page: + http://forums.miranda-im.org/showthread.php?p= + - Or you can e-mail me them.. + - Feature requests can also be submitted ot the project homepage: + http://trac/BanControl/newticket + +10. Localisation +-------------------------------- +Coming soon + +Copyright (C) 2006 A. Chilaru (FlexLabs Inc. ) \ No newline at end of file diff --git a/BanControl/TRANSLATION.txt b/BanControl/TRANSLATION.txt new file mode 100644 index 0000000..e18fe15 --- /dev/null +++ b/BanControl/TRANSLATION.txt @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////// +// Ban Control plugin for Miranda. Bans a contact for a specific time +// http://trac/BanControl/ +// Copyright (C) 2007 A. Chilaru (FlexLabs Inc. ) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////// + +This is a list of all the text lines that can be translated. I've already given them a value, so that you can see how to use them, if you don't know. Add these lines to your langpack file, and restart miranda to apply these settings. diff --git a/BanControl/common.arg b/BanControl/common.arg new file mode 100644 index 0000000..c32339f --- /dev/null +++ b/BanControl/common.arg @@ -0,0 +1,63 @@ + + STDFUNC _SetAllChildIcons@16 + "hCList" HWND + "hFirstItem" HANDLE + "iColumn" INT + "iImage" INT + END + + STDFUNC _SetListGroupIcons@16 + "hCList" HWND + "hFirstItem" HANDLE + "hParentItem" HMODULE + "groupChildCount" INT + END + + STDFUNC _SetAllContactIcons@4 + "hCList" HWND + END + + STDFUNC _ResetListOptions@4 + "hCList" HWND + END + + STDFUNC _MetaConClick@12 + "hContact" HWND + "iCount" INT + "iValue" INT + END + + STDFUNC _MetaSubClick@4 + "hParent" HWND + END + + STDFUNC _CallService@12 + "lpServiceName" ASCII + "wParam" HEX + "lParam" PTR + END + + STDFUNC _ServiceExists@4 + "lpServiceName" ASCII + END + + STDFUNC _HookEvent@8 + "lpHookNam" ASCII + "lpFunction" PTR + END + + STDFUNC _UnhookEvent@4 + "HookHandle" HANDLE + END + + STDFUNC _Translate@4 + "lpStr" ASCII + END + + STDFUNC _Error@4 + "lpStr" ASCII + END + + STDFUNC _IgnoreCheck@12 + "pStri" ASCII + END diff --git a/BanControl/inc/IcoLib.inc b/BanControl/inc/IcoLib.inc new file mode 100644 index 0000000..022dfb6 --- /dev/null +++ b/BanControl/inc/IcoLib.inc @@ -0,0 +1,51 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +SKINICONDESC struct + cbSize dd ? + pszSection dd ?;section name used to group icons + pszDescription dd ?;description for options dialog + pszName dd ?;name to refer to icon when playing and in db + ;this name is miranda-wide. so use prefixes of your plugin + ;e.g: "isee_connect", "clist_delete", etc + pszDefaultFile dd ?;default icon file to use + iDefaultIndex dd ? +SKINICONDESC ends + +SKINICONDESC2 struct + cbSize dd ? + pszSection dd ?;section name used to group icons + pszDescription dd ?;description for options dialog + pszName dd ?;name to refer to icon when playing and in db + pszDefaultFile dd ? + iDefaultIndex dd ? + hDefaultIcon dd ? +SKINICONDESC2 ends + +; +; Add a icon into options UI +; +; wParam = (WPARAM)0 +; lParam = (LPARAM)(SKINICONDESC*)sid; +; +;MS_SKIN2_ADDICON db "Skin2/Icons/AddIcon",0 +; +; Retrieve HICON with name specified in lParam +; Returned HICON SHOULDN'T be destroyed, it managed by IcoLib +; +;MS_SKIN2_GETICON "Skin2/Icons/GetIcon",0 +; +; Icons change notification +; +;ME_SKIN2_ICONSCHANGED "Skin2/IconsChanged",0 \ No newline at end of file diff --git a/BanControl/inc/m_clc.inc b/BanControl/inc/m_clc.inc new file mode 100644 index 0000000..12c13ee --- /dev/null +++ b/BanControl/inc/m_clc.inc @@ -0,0 +1,203 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +CLS_MANUALUPDATE equ 0001h ;todo +CLS_SHOWHIDDEN equ 0002h +CLS_HIDEOFFLINE equ 0004h ;hides all offline users +CLS_CHECKBOXES equ 0008h +CLS_MULTICOLUMN equ 0010h ;not true multi-column, just for ignore/vis options +CLS_HIDEEMPTYGROUPS equ 0020h ;note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons +CLS_USEGROUPS equ 0040h +CLS_NOHIDEOFFLINE equ 0080h ;overrides CLS_HIDEOFFLINE and the per-group hideoffline setting +CLS_GREYALTERNATE equ 0100h ;make every other line slightly grey +CLS_GROUPCHECKBOXES equ 0200h ;put checkboxes on groups too (managed by CLC) +CLS_CONTACTLIST equ 0400h ;this control will be the main contact list (v. 0.3.4.3+ 2004/11/02) + +CLS_EX_DISABLEDRAGDROP equ 00000001h +CLS_EX_EDITLABELS equ 00000002h +CLS_EX_SHOWSELALWAYS equ 00000004h +CLS_EX_TRACKSELECT equ 00000008h +CLS_EX_SHOWGROUPCOUNTS equ 00000010h +CLS_EX_DIVIDERONOFF equ 00000020h +CLS_EX_HIDECOUNTSWHENEMPTY equ 00000040h +CLS_EX_NOTRANSLUCENTSEL equ 00000080h +CLS_EX_LINEWITHGROUPS equ 00000100h +CLS_EX_QUICKSEARCHVISONLY equ 00000200h +CLS_EX_SORTGROUPSALPHA equ 00000400h +CLS_EX_NOSMOOTHSCROLLING equ 00000800h + + +CLM_FIRST equ 1000h ;this is the same as LVM_FIRST +CLM_LAST equ 1100h + +;messages, compare with equivalent TVM_s in the MSDN +CLM_ADDCONTACT equ (CLM_FIRST+0) ;wParam=hContact +CLM_ADDGROUP equ (CLM_FIRST+1) ;wParam=hGroup +CLM_AUTOREBUILD equ (CLM_FIRST+2) +CLM_DELETEITEM equ (CLM_FIRST+3) ;wParam=hItem +CLM_EDITLABEL equ (CLM_FIRST+4) ;wParam=hItem +CLM_ENDEDITLABELNOW equ (CLM_FIRST+5) ;wParam=cancel, 0 to save +CLM_ENSUREVISIBLE equ (CLM_FIRST+6) ;wParam=hItem, lParam=partialOk +CLE_TOGGLE equ -1 +CLE_COLLAPSE equ 0 +CLE_EXPAND equ 1 +CLE_INVALID equ FFFFh +CLM_EXPAND equ (CLM_FIRST+7) ;wParam=hItem, lParam=CLE_ +CLM_FINDCONTACT equ (CLM_FIRST+8) ;wParam=hContact, returns an hItem +CLM_FINDGROUP equ (CLM_FIRST+9) ;wParam=hGroup, returns an hItem +CLM_GETBKCOLOR equ (CLM_FIRST+10) ;returns a COLORREF +CLM_GETCHECKMARK equ (CLM_FIRST+11) ;wParam=hItem, returns 1 or 0 +CLM_GETCOUNT equ (CLM_FIRST+12) ;returns the total number of items +CLM_GETEDITCONTROL equ (CLM_FIRST+13) ;returns the HWND, or NULL +CLM_GETEXPAND equ (CLM_FIRST+14) ;wParam=hItem, returns a CLE_, CLE_INVALID if not a group +CLM_GETEXTRACOLUMNS equ (CLM_FIRST+15) ;returns number of extra columns +CLM_GETEXTRAIMAGE equ (CLM_FIRST+16) ;wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or 0xFF +CLM_GETEXTRAIMAGELIST equ (CLM_FIRST+17) ;returns HIMAGELIST +CLM_GETFONT equ (CLM_FIRST+18) ;wParam=fontId, see clm_setfont. returns hFont. +CLM_GETINDENT equ (CLM_FIRST+19) ;wParam=new group indent +CLM_GETISEARCHSTRING equ (CLM_FIRST+20) ;lParam=(char*)pszStr, max 120 bytes, returns number of chars in string +CLM_GETITEMTEXT equ (CLM_FIRST+21) ;wParam=hItem, lParam=(char*)pszStr, max 120 bytes +CLM_GETSCROLLTIME equ (CLM_FIRST+22) ;returns time in ms +CLM_GETSELECTION equ (CLM_FIRST+23) ;returns hItem +CLCHT_ABOVE equ 0001h ;above client area +CLCHT_BELOW equ 0002h ;below client area +CLCHT_TOLEFT equ 0004h ;left of client area +CLCHT_TORIGHT equ 0008h ;right of client area +CLCHT_NOWHERE equ 0010h ;in client area, not on an item +CLCHT_ONITEMICON equ 0020h +CLCHT_ONITEMCHECK equ 0040h +CLCHT_ONITEMLABEL equ 0080h +CLCHT_ONITEMINDENT equ 0100h ;to the left of an item icon +CLCHT_ONITEMEXTRA equ 0200h ;on an extra icon, HIBYTE(HIWORD()) says which +CLCHT_ONITEM equ 03E0h +CLCHT_INLEFTMARGIN equ 0400h +CLCHT_BELOWITEMS equ 0800h ;in client area but below last item +CLM_HITTEST equ (CLM_FIRST+25) ;lParam=MAKELPARAM(x,y) (relative to control), wParam=(PDWORD)&hitTest (see encoding of HitTest() in clc.h, can be NULL) returns hItem or NULL +CLM_SELECTITEM equ (CLM_FIRST+26) ;wParam=hItem +CLB_TOPLEFT equ 0 +CLB_STRETCHV equ 1 +CLB_STRETCHH equ 2 ;and tile vertically +CLB_STRETCH equ 3 +CLBM_TYPE equ 00FFh +CLBF_TILEH equ 1000h +CLBF_TILEV equ 2000h +CLBF_PROPORTIONAL equ 4000h +CLBF_SCROLL equ 8000h +CLM_SETBKBITMAP equ (CLM_FIRST+27) ;wParam=mode, lParam=hBitmap (don't delete it), NULL for none +CLM_SETBKCOLOR equ (CLM_FIRST+28) ;wParam=a COLORREF, default is GetSysColor(COLOR_3DFACE) +CLM_SETCHECKMARK equ (CLM_FIRST+29) ;wParam=hItem, lParam=1 or 0 +CLM_SETEXTRACOLUMNS equ (CLM_FIRST+30) ;wParam=number of extra columns (zero to MAXEXTRACOLUMNS from clc.h, currently 16) +CLM_SETEXTRAIMAGE equ (CLM_FIRST+31) ;wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=0xFF is a blank +CLM_SETEXTRAIMAGELIST equ (CLM_FIRST+32) ;lParam=HIMAGELIST + +FONTID_CONTACTS equ 0 +FONTID_INVIS equ 1 +FONTID_OFFLINE equ 2 +FONTID_NOTONLIST equ 3 +FONTID_GROUPS equ 4 +FONTID_GROUPCOUNTS equ 5 +FONTID_DIVIDER equ 6 +FONTID_OFFINVIS equ 7 +FONTID_STATUSMSG equ 8 +FONTID_GROUPSCLOSED equ 9 +FONTID_CONTACTSHOVER equ 10 +FONTID_MAX equ 18 + +CLM_SETFONT equ (CLM_FIRST+33) ;wParam=hFont, lParam=MAKELPARAM(fRedraw,fontId) +CLM_SETINDENT equ (CLM_FIRST+34) ;wParam=new indent, default is 3 pixels +CLM_SETITEMTEXT equ (CLM_FIRST+35) ;wParam=hItem, lParam=(char*)pszNewText +CLM_SETSCROLLTIME equ (CLM_FIRST+36) ;wParam=time in ms, default 200 + +CLM_SETHIDEEMPTYGROUPS equ (CLM_FIRST+38) ;wParam=TRUE/FALSE +GREYF_UNFOCUS equ 80000000h +MODEF_OFFLINE equ 40000000h + +;and use the PF2_ #defines from m_protosvc.h +CLM_SETGREYOUTFLAGS equ (CLM_FIRST+39) ;wParam=new flags +CLM_GETHIDEOFFLINEROOT equ (CLM_FIRST+40) ;returns TRUE/FALSE +CLM_SETHIDEOFFLINEROOT equ (CLM_FIRST+41) ;wParam=TRUE/FALSE +CLM_SETUSEGROUPS equ (CLM_FIRST+42) ;wParam=TRUE/FALSE +CLM_SETOFFLINEMODES equ (CLM_FIRST+43) ;for 'hide offline', wParam=PF2_ flags and MODEF_OFFLINE +CLM_GETEXSTYLE equ (CLM_FIRST+44) ;returns CLS_EX_ flags +CLM_SETEXSTYLE equ (CLM_FIRST+45) ;wParam=CLS_EX_ flags +CLM_GETLEFTMARGIN equ (CLM_FIRST+46) ;returns count of pixels +CLM_SETLEFTMARGIN equ (CLM_FIRST+47) ;wParam=pixels + +CLCINFOITEM struct + cbSize dd ? + pszText dd ? + hParentGroup dd ? + flags dd ? + hIcon dd ? +CLCINFOITEM ends + +CLCIIF_BELOWGROUPS equ 1 ;put it between groups and contacts, default is at top +CLCIIF_BELOWCONTACTS equ 2 ;put it at the bottom +CLCIIF_CHECKBOX equ 40h ;give this item a check box +CLCIIF_GROUPFONT equ 80h ;draw the item using FONTID_GROUPS + +CLM_ADDINFOITEMA equ (CLM_FIRST+48) ;lParam=&cii, returns hItem +CLM_ADDINFOITEMW equ (CLM_FIRST+53) ;lParam=&cii, returns hItem +IFDEF _UNICODE + CLM_ADDINFOITEM equ CLM_ADDINFOITEMW +ELSE + CLM_ADDINFOITEM equ CLM_ADDINFOITEMA +ENDIF + +CLCIT_INVALID equ -1 +CLCIT_GROUP equ 0 +CLCIT_CONTACT equ 1 +CLCIT_DIVIDER equ 2 +CLCIT_INFO equ 3 +CLM_GETITEMTYPE equ (CLM_FIRST+49) ;wParam=hItem, returns a CLCIT_ +CLGN_ROOT equ 0 +CLGN_CHILD equ 1 +CLGN_PARENT equ 2 +CLGN_NEXT equ 3 +CLGN_PREVIOUS equ 4 +CLGN_NEXTCONTACT equ 5 +CLGN_PREVIOUSCONTACT equ 6 +CLGN_NEXTGROUP equ 7 +CLGN_PREVIOUSGROUP equ 8 +CLM_GETNEXTITEM equ (CLM_FIRST+50) ;wParam=flag, lParam=hItem, returns an hItem +CLM_GETTEXTCOLOR equ (CLM_FIRST+51) ;wParam=FONTID_, returns COLORREF +CLM_SETTEXTCOLOR equ (CLM_FIRST+52) ;wParam=FONTID_, lParam=COLORREF + +;notifications (most are omitted because the control processes everything) +CLNF_ISGROUP equ 1 +CLNF_ISINFO equ 2 + +NMCLISTCONTROL struct + hdr NMHDR <> + hItem dd ? + action dd ? + iColumn dd ? ;-1 if not on an extra column + flags dd ? + pt POINT <> +NMCLISTCONTROL ends + +CLN_FIRST equ (0-100) +CLN_EXPANDED equ (CLN_FIRST-0) ;hItem=hGroup, action=CLE_* +CLN_LISTREBUILT equ (CLN_FIRST-1) +CLN_ITEMCHECKED equ (CLN_FIRST-2) ;todo //hItem,action,flags valid +CLN_DRAGGING equ (CLN_FIRST-3) ;hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed +CLN_DROPPED equ (CLN_FIRST-4) ;hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed +CLN_LISTSIZECHANGE equ (CLN_FIRST-5) ;pt.y valid. the vertical height of the visible items in the list has changed. +CLN_OPTIONSCHANGED equ (CLN_FIRST-6) ;nothing valid. If you set some extended options they have been overwritten and should be re-set +CLN_DRAGSTOP equ (CLN_FIRST-7) ;hItem,flags valid. sent when cursor goes back in to the window having been outside, return nonzero if processed +CLN_NEWCONTACT equ (CLN_FIRST-8) ;hItem,flags valid. sent when a new contact is added without a full list rebuild +CLN_CONTACTMOVED equ (CLN_FIRST-9) ;hItem,flags valid. sent when contact is moved without a full list rebuild +CLN_CHECKCHANGED equ (CLN_FIRST-10) ;hItem,flags valid. sent when any check mark is changed, but only for one change if there are many +;NM_CLICK //hItem,iColumn,pt,flags valid +;NM_KEYDOWN //NMKEY structure, only sent when key is not already processed, return nonzero to prevent further processing \ No newline at end of file diff --git a/BanControl/inc/m_clist.inc b/BanControl/inc/m_clist.inc new file mode 100644 index 0000000..e277e99 --- /dev/null +++ b/BanControl/inc/m_clist.inc @@ -0,0 +1,33 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +CLISTMENUITEM struc + cbSize dd ? + UNION NONUNIQUE + pszName dd ? + ptszName dd ? + ENDS + flags dd ? + position dd ? + hIcon HICON ? + pszService dd ? + ;UNION NONUNIQUE + pszPopupName dd ? + ; ptszPopupName dd ? + ; ENDS + popupPosition dd ? + hotKey dd ? + pszContactOwner dd ? +CLISTMENUITEM ends + diff --git a/BanControl/inc/m_database.inc b/BanControl/inc/m_database.inc new file mode 100644 index 0000000..b5cd683 --- /dev/null +++ b/BanControl/inc/m_database.inc @@ -0,0 +1,60 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +DBCONTACTGETSETTING struct + szModule dd ? + szSetting dd ? + pValue dd ? +DBCONTACTGETSETTING ends + +DBCONTACTWRITESETTING struct + szModule dd ? + szSetting dd ? + VAR1 dd ? + VAR2 dd ? + VAR3 dd ? +DBCONTACTWRITESETTING ends + +DBVT_DELETED equ 0 ;this setting just got deleted, no other values are valid +DBVT_BYTE equ 1 ;bVal and cVal are valid +DBVT_WORD equ 2 ;wVal and sVal are valid +DBVT_DWORD equ 4 ;dVal and lVal are valid +DBVT_ASCIIZ equ 255 ;pszVal is valid +DBVT_BLOB equ 254 ;cpbVal and pbVal are valid +DBVT_UTF8 equ 253 ;pszVal is valid +DBVT_WCHAR equ 252 ;pszVal is valid +DBVTF_VARIABLELENGTH equ 80h + +DBVARIANT struct + VAR1 dd ? + VAR2 dd ? + VAR3 dd ? +DBVARIANT ends + +DBEVENTINFO struct + cbSize dd ? + szModule dd ? + timestamp dd ? + flags dd ? + eventType dd ? + cbBlob dd ? + pBlob dd ? +DBEVENTINFO ends + +EVENTTYPE_MESSAGE equ 0 +EVENTTYPE_URL equ 1 +EVENTTYPE_CONTACTS equ 2 ;v0.1.2.2+ +EVENTTYPE_ADDED equ 1000 ;v0.1.1.0+: these used to be module- +EVENTTYPE_AUTHREQUEST equ 1001 ;specific codes, hence the module- +EVENTTYPE_FILE equ 1002 ;specific limit has been raised to 2000 \ No newline at end of file diff --git a/BanControl/inc/m_langpack.inc b/BanControl/inc/m_langpack.inc new file mode 100644 index 0000000..ffe77f5 --- /dev/null +++ b/BanControl/inc/m_langpack.inc @@ -0,0 +1,30 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +IFDEF _UNICODE + LANG_UNICODE equ 1000h +ELSE + LANG_UNICODE equ 0 +ENDIF + +LANGPACKTRANSLATEDIALOG struct + cbSize dd ? + flags dd ? + hwndDlg dd ? + ignoreControls dd ? +LANGPACKTRANSLATEDIALOG ends + +LPTDF_NOIGNOREEDIT equ 1 ;translate all edit controls. By default + ;non-read-only edit controls are not translated +LPTDF_NOTITLE equ 2 ;do not translate the title of the dialog diff --git a/BanControl/inc/m_metacontacts.inc b/BanControl/inc/m_metacontacts.inc new file mode 100644 index 0000000..3294ff2 --- /dev/null +++ b/BanControl/inc/m_metacontacts.inc @@ -0,0 +1,149 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +;get the handle for a contact's parent metacontact +;wParam=(HANDLE)hSubContact +;lParam=0 +;returns a handle to the parent metacontact, or null if this contact is not a subcontact +;MS_MC_GETMETACONTACT "MetaContacts/GetMeta" + +;gets the handle for the default contact +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns a handle to the default contact, or null on failure +;MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault" + +;gets the contact number for the default contact +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns a DWORD contact number, or -1 on failure +;MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum" + +;gets the handle for the 'most online' contact +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns a handle to the 'most online' contact +;MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline" + +;gets the number of subcontacts for a metacontact +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns a DWORD representing the number of subcontacts for the given metacontact +;MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts" + +;gets the handle of a subcontact, using the subcontact's number +;wParam=(HANDLE)hMetaContact +;lParam=(DWORD)contact number +;returns a handle to the specified subcontact +;MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact" + +;sets the default contact, using the subcontact's contact number +;wParam=(HANDLE)hMetaContact +;lParam=(DWORD)contact number +;returns 0 on success +;MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault" + +;sets the default contact, using the subcontact's handle +;wParam=(HANDLE)hMetaContact +;lParam=(HANDLE)hSubcontact +;returns 0 on success +;MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle" + +;forces the metacontact to send using a specific subcontact, using the subcontact's contact number +;wParam=(HANDLE)hMetaContact +;lParam=(DWORD)contact number +;returns 0 on success +;MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact" + +;forces the metacontact to send using a specific subcontact, using the subcontact's handle +;wParam=(HANDLE)hMetaContact +;lParam=(HANDLE)hSubcontact +;returns 0 on success (will fail if 'force default' is in effect) +;MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle" + +;'unforces' the metacontact to send using a specific subcontact +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns 0 on success (will fail if 'force default' is in effect) +;MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact" + +;'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact +; overrides (and clears) 'force send' above, and will even force use of offline contacts +; will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event +;wParam=(HANDLE)hMetaContact +;lParam=0 +;returns 1(true) or 0(false) representing new state of 'force default' +;MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault" + +; method to get state of 'force' for a metacontact +; wParam=(HANDLE)hMetaContact +; lParam= (DWORD)&contact_number or NULL +; +; if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to, +; or if none is in force, the value (DWORD)-1 will be copied +; (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above) +;MS_MC_GETFORCESTATE "MetaContacts/GetForceState" + +; fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set) +; wParam=(HANDLE)hMetaContact +; lParam=(HANDLE)hDefaultContact +;ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged" + +; fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when +; contacts are reordered) - a signal to re-read metacontact data +; wParam=(HANDLE)hMetaContact +; lParam=0 +;ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged" + +; fired when a metacontact is forced to send using a specific subcontact +; wParam=(HANDLE)hMetaContact +; lParam=(HANDLE)hForceContact +;ME_MC_FORCESEND "MetaContacts/ForceSend" + +; fired when a metacontact is 'unforced' to send using a specific subcontact +; wParam=(HANDLE)hMetaContact +; lParam=0 +;ME_MC_UNFORCESEND "MetaContacts/UnforceSend" + +; method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :) +; wParam=lParam=0 +;MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName" + + +; added 0.9.5.0 (22/3/05) +; wParam=(HANDLE)hContact +; lParam=0 +; convert a given contact into a metacontact +;MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact" + +; added 0.9.5.0 (22/3/05) +; wParam=(HANDLE)hContact +; lParam=(HANDLE)hMeta +; add an existing contact to a metacontact +;MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact" + +; added 0.9.5.0 (22/3/05) +; wParam=0 +; lParam=(HANDLE)hContact +; remove a contact from a metacontact +;MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact" + + +; added 0.9.13.2 (6/10/05) +; wParam=(BOOL)disable +; lParam=0 +; enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting +; should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called +; before the metacontact onmodulesloaded handler where the subcontact hiding is usually done) +;MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup" diff --git a/BanControl/inc/m_options.inc b/BanControl/inc/m_options.inc new file mode 100644 index 0000000..cfbf539 --- /dev/null +++ b/BanControl/inc/m_options.inc @@ -0,0 +1,36 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +OPTIONSDIALOGPAGE struct + cbSize dd ? ;cbSize + position dd ? ;position + pszTitle dd ? ;*pszTitle + pfnDlgProc dd ? ;pfnDlgProc + pszTemplate dd ? ;*pszTemplate + hInstance dd ? ;hInstance + hIcon dd ? ;hIcon + pszGroup dd ? ;*pszGroup + groupPosition dd ? ;groupPosition + hGroupIcon dd ? ;hGroupIcon + flags dd ? ;flags + nIDBottomSimpleControl dd ? ;nIDBottomSimpleControl + nIDRightSimpleControl dd ? ;nIDRightSimpleControl + expertOnlyControls dd ? ;*expertOnlyControls + nExpertOnlyControls dd ? ;nExpertOnlyControls +OPTIONSDIALOGPAGE ends + +ODPF_SIMPLEONLY equ 1 ; page is only shown when in simple mode +ODPF_EXPERTONLY equ 2 ; " expert mode +ODPF_BOLDGROUPS equ 4 ; give group box titles a bold font +ODPF_UNICODE equ 8 ; string fields in OPTIONSDIALOGPAGE are WCHAR* diff --git a/BanControl/inc/m_protocols.inc b/BanControl/inc/m_protocols.inc new file mode 100644 index 0000000..bbe3542 --- /dev/null +++ b/BanControl/inc/m_protocols.inc @@ -0,0 +1,14 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/BanControl/inc/m_protosvc.inc b/BanControl/inc/m_protosvc.inc new file mode 100644 index 0000000..15cbb10 --- /dev/null +++ b/BanControl/inc/m_protosvc.inc @@ -0,0 +1,18 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +PFLAGNUM_1 equ 1 +PF1_IMSEND equ 00000001h ;supports IM sending +PF1_IMRECV equ 00000002h ;supports IM receiving +PF1_IM equ (PF1_IMSEND or PF1_IMRECV) \ No newline at end of file diff --git a/BanControl/inc/m_updater.inc b/BanControl/inc/m_updater.inc new file mode 100644 index 0000000..a10d992 --- /dev/null +++ b/BanControl/inc/m_updater.inc @@ -0,0 +1,29 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +UPDATE struct + cbSize dd ? + szComponentName dd ? + szVersionURL dd ? + pbVersionPrefix dd ? + cpbVersionPrefix dd ? + szUpdateURL dd ? + szBetaVersionURL dd ? + pbBetaVersionPrefix dd ? + cpbBetaVersionPrefix dd ? + szBetaUpdateURL dd ? + pbVersion dd ? + cpbVersion dd ? + szBetaChangelogURL dd ? +UPDATE ends \ No newline at end of file diff --git a/BanControl/inc/newpluginapi.inc b/BanControl/inc/newpluginapi.inc new file mode 100644 index 0000000..398d4cd --- /dev/null +++ b/BanControl/inc/newpluginapi.inc @@ -0,0 +1,44 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +PLUGININFO struc + cbSize dd ? + shortName dd ? + version dd ? + description dd ? + author dd ? + authorEmail dd ? + copyright dd ? + homepage dd ? + isTransient dd ? + replacesDefaultModule dd ? +PLUGININFO ends + +PLUGINLINK struc + lpCreateHookableEvent dd ? ;(const char *); + lpDestroyHookableEvent dd ? ;(HANDLE); + lpNotifyEventHooks dd ? ;(HANDLE,WPARAM,LPARAM); + lpHookEvent dd ? ;(const char *,MIRANDAHOOK); + lpHookEventMessage dd ? ;(const char *,HWND,UINT); + lpUnhookEvent dd ? ;(HANDLE); + lpCreateServiceFunction dd ? ;(const char *,MIRANDASERVICE) + lpCreateTransientServiceFunction dd ? ;(const char *,MIRANDASERVICE) + lpDestroyServiceFunction dd ? ;(HANDLE) + lpCallService dd ? ;(const char *,WPARAM,LPARAM) + lpServiceExists dd ? ;(const char *); //v0.1.0.1+ + lpCallServiceSync dd ? ;(const char *,WPARAM,LPARAM); //v0.3.3+ + lpCallFunctionAsync dd ? ;(void (__stdcall *)(void *), void *); //v0.3.4+ + lpSetHookDefaultForHookableEvent dd ? ;(HANDLE, MIRANDAHOOK); // v0.3.4 (2004/09/15) +PLUGINLINK ends + diff --git a/BanControl/inc/statusmodes.inc b/BanControl/inc/statusmodes.inc new file mode 100644 index 0000000..609084e --- /dev/null +++ b/BanControl/inc/statusmodes.inc @@ -0,0 +1,26 @@ +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +MAX_CONNECT_RETRIES equ 10000 +ID_STATUS_OFFLINE equ 40071 +ID_STATUS_ONLINE equ 40072 +ID_STATUS_AWAY equ 40073 +ID_STATUS_DND equ 40074 +ID_STATUS_NA equ 40075 +ID_STATUS_OCCUPIED equ 40076 +ID_STATUS_FREECHAT equ 40077 +ID_STATUS_INVISIBLE equ 40078 +ID_STATUS_ONTHEPHONE equ 40079 +ID_STATUS_OUTTOLUNCH equ 40080 +ID_STATUS_IDLE equ 40081 ;do not use as a status \ No newline at end of file diff --git a/BanControl/plugin/BanControl.asm b/BanControl/plugin/BanControl.asm new file mode 100644 index 0000000..b8e7e8d --- /dev/null +++ b/BanControl/plugin/BanControl.asm @@ -0,0 +1,1160 @@ +;Ban Control plugin for Miranda. Bans a contact for a specific time +;Copyright (C) 2007 A. Chilaru +; +;This program is free software; you can redistribute it and/or +;modify it under the terms of the GNU General Public License +;as published by the Free Software Foundation; either version 2 +;of the License, or (at your option) any later version. +; +;This program is distributed in the hope that it will be useful, +;but WITHOUT ANY WARRANTY; without even the implied warranty of +;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;GNU General Public License for more details. +; +;You should have received a copy of the GNU General Public License +;along with this program; if not, write to the Free Software +;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +.386 +.model flat,stdcall +option casemap:none +include \masm32\include\windows.inc +include \masm32\include\kernel32.inc +include \masm32\include\user32.inc +include \masm32\include\comctl32.inc +include \masm32\include\gdi32.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\IcoLib.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_clist.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_clc.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_database.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_langpack.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_options.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_protocols.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_protosvc.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\m_updater.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\newpluginapi.inc +include \masm32\FlexLabs\BanControl\Source\trunk\inc\statusmodes.inc + +includelib \masm32\lib\kernel32.lib +includelib \masm32\lib\user32.lib +includelib \masm32\lib\comctl32.lib +includelib \masm32\lib\gdi32.lib + + ;function definitions for debuggers + ;hook functions are C-style functions. The rest are stdcall +OptInit proto C wParam:DWORD, lParam:DWORD +Message proto C wParam:DWORD, lParam:DWORD +MdLoaded proto C wParam:DWORD, lParam:DWORD +IcoLibEv proto C wParam:DWORD, lParam: DWORD + +CallService proto lpServiceName:DWORD, wParam:DWORD, lParam:DWORD +ServiceExists proto lpServiceName:DWORD +HookEvent proto lpHookName:DWORD, lpFunction:DWORD +UnhookEvent proto HookHandle:DWORD + +Translate proto lpStr:DWORD +Error proto lpStr:DWORD +ResetListOptions proto hCList:DWORD +SetAllContactIcons proto hCList:DWORD +SetListGroupIcons proto hCList:DWORD, hFirstItem:DWORD, hParentItem:DWORD, groupChildCount:DWORD +SetAllChildIcons proto hCList:DWORD, hFirstItem:DWORD, iColumn:DWORD, iImage:DWORD +MetaConClick proto hContact:DWORD, iCount:DWORD, iValue: DWORD +MetaSubClick proto hContact:DWORD + +DLGHDR struct ;Structure to hold info about tabs + hDlg dd ? + hTab dd ? + hDisplay dd ? + rcDisplay RECT <> + hTab1 dd ? + hTab2 dd ? +DLGHDR ends + + ;Macro to create lParam DWORD from two WORDs (low WORDs used if DWORD given) +MAKELPARAM macro lowWord, highWord + push ebx + mov ebx, lowWord + mov eax, highWord + shl eax, 16 + mov ax, bx + pop ebx + ENDM + +.const + ;option controls +IDC_ENABLED equ 40071 ;Plugin enables checkbox ID +IDC_PROTO equ 40081 ;Protocol listbox ID +IDC_STARTTIME equ 40088 ;time selector +IDC_ENDTIME equ 40089 ;time selector +IDC_SHOWHIDDEN equ 50071 ;Show hidden contacts + +IDC_CLIST equ 3000 ;CList component + +IDI_BAN equ 101 ;PC icon + + ;const from miranda resource file (small dot in CListControl) +IDI_SMALLDOT equ 211 + + ;const from skin header +SKINICON_EVENT_MESSAGE equ 100 + +WM_IMGLIST equ WM_USER+273 + +.data +hInstance dd 0 ;Plugin hWnd +hApp dd 0 ;Miranda .exe hWnd +hDlgWnd dd 0 ;Option dialog hWnd +hIcoLibEv dd 0 ;IcoLib dialog hWnd +hIml dd 0 ;Image list +hItemAll dd 0 ;CListControl "Group" ** All contacts **" +hItemUnk dd 0 ;CListControl "Group" ** Unknown contacts **" + +ddRetAddr dd 0 ;Miranda proto ret. address +ddRetStack dd 0 ;Miranda proto EBP backup + +hMsgHook dd 0 ;Message hook hWnd +hOptHook dd 0 ;Options hook hWnd +hMdLHook dd 0 ;Modules loaded hook + +ddVar1 dd 0 +ddVar2 dd 0 ;Just three DWORD variables ;) +ddVar3 dd 0 +ddInt dd 0 +ddFlags dd 0 ;Various flags. Descriptions (starting from the lower bit) + ;Reserved + ;OptEditing2 On while options are loaded from the DB + ;OptEditing2 On while options are loaded from the DB + ;noUniConvert Don't convert to Unicode while translating + +sPluginInfo PLUGININFO <0> ;plugin info structure +sPluginLink PLUGINLINK <> ;miranda procedure adresses structure +sOptionsPage OPTIONSDIALOGPAGE <0> ;options struct +sDBVariant DBVARIANT <> ;DB write/get variable struct +sDBGetSetting DBCONTACTGETSETTING <> ;DB get struct +sDBWriteSetting DBCONTACTWRITESETTING <>;DB write struct +sDBEventInfo DBEVENTINFO <> ;Event ifnfo struct +sUpdate UPDATE <0> ;Updater struct +sTCITEM TCITEM <0> ;struct for tabbing +sDlgHdr DLGHDR <0> ;struct for tabbing +sSystemTime SYSTEMTIME <> ;datetime struct +sLngPackDialog LANGPACKTRANSLATEDIALOG <> ;langpack dialog struct +sClcInfoItem CLCINFOITEM <> ;contact list child item info +sSkinIconDesc SKINICONDESC <> ;IcoLib struct + + ;plugin details +szShortName db "Ban Control",0 +szShortNamev db "Ban Control " +IFDEF _UNICODE + szPlVer db "(Unicode)",0 +ELSE + szPlVer db "(ANSI)",0 +ENDIF +ddVersion dd 00000100h +szDescription db "The plugin allows banning users for a certain time.",10,13,"Allows saving history, exporting it or disabling and other options.",0 +szAuthor db "A. Chilaru",0 +szAthorEmail db "flexlabs@gmail.com",0 +szCopyright db "© 2007 A. Chilaru (FlexLabs Inc.)",0 +szHomepage db "http://dev.mirandaim.ru/~flexer/",0 + + ;additional details for updater +IFDEF _UNICODE + szURL db "http://addons.miranda-im.org/",0 + szURLKey db "Ban Control (Unicode) ",0 + ddURLKeyLen dd 33h + szDnURL db "http://addons.miranda-im.org/",0 +ELSE + szURL db "http://addons.miranda-im.org/",0 + szURLKey db "Ban Control (ANSI) ",0 + ddURLKeyLen dd 30h + szDnURL db "http://addons.miranda-im.org/",0 +ENDIF +szBetaURL db "http://svn.mirandaim.ru/mainrepo/bancontrol/trunk/BETA",0 +szBetaURLKey db "BanControl_v.",0 +ddBetaURLKeyLen dd 0Dh +IFDEF _UNICODE + szBetaDnURL db "http://svn.mirandaim.ru/mainrepo/bancontrol/trunk/bin/BanControlW.dll",0 +ELSE + szBetaDnURL db "http://svn.mirandaim.ru/mainrepo/bancontrol/trunk/bin/BanControlA.dll",0 +ENDIF +szVersion db "0.0.1.0",0 +ddVersionLen dd 07h +ddBeta dd 1 ;If plugin is beta - 1. Else - 0 +szBetaChangelogURL db "http://svn.mirandaim.ru/mainrepo/bancontrol/trunk/CHANGELOG.txt",0 + + ;miranda functions +MS_DB_CONTACT_GETSETTING db "DB/Contact/GetSetting",0 +MS_DB_CONTACT_WRITESETTING db "DB/Contact/WriteSetting",0 +MS_DB_CONTACT_FINDFIRST db "DB/Contact/FindFirst",0 +MS_DB_CONTACT_FINDNEXT db "DB/Contact/FindNext",0 +MS_DB_EVENT_GET db "DB/Event/Get",0 +MS_DB_EVENT_GETBLOBSIZE db "DB/Event/GetBlobSize",0 +MS_DB_EVENT_GETCONTACT db "DB/Event/GetContact",0 +MS_PROTO_GETCONTACTBASEPROTO db "Proto/GetContactBaseProto",0 +MS_CLIST_ADDMAINMENUITEM db "CList/AddMainMenuItem",0 +MS_CLIST_GETSTATUSMODE db "CList/GetStatusMode",0 +MS_OPT_ADDPAGE db "Opt/AddPage",0 +MS_PROTO_ENUMPROTOCOLS db "Proto/EnumProtocols",0 +MS_MC_GETMETACONTACT db "MetaContacts/GetMeta",0 +MS_MC_GETSUBCONTACT db "MetaContacts/GetSubContact",0 +ME_SYSTEM_MODULESLOADED db "Miranda/System/ModulesLoaded",0 +MS_SKIN_LOADICON db "Skin/Icons/Load",0 +MS_SKIN2_ADDICON db "Skin2/Icons/AddIcon",0 +MS_SKIN2_GETICON db "Skin2/Icons/GetIcon",0 +MS_UPDATE_REGISTER db "Update/Register",0 +MS_LANGPACK_TRANSLATESTRING db "LangPack/TranslateString",0 +MS_LANGPACK_TRANSLATEDIALOG db "LangPack/TranslateDialog",0 + +PS_GETCAPS db "/GetCaps",0 ;Takes form of "PROTO/GetCaps",0 (GetCapabilities of a PROTO) + + ;miranda events +ME_DB_EVENT_ADDED db "DB/Event/Added",0 +ME_OPT_INITIALISE db "Opt/Initialise",0 +ME_SKIN2_ICONSCHANGED db "Skin2/IconsChanged",0 + + ;options +szOptGroup db "Events",0 +szOptGroupW db "Unicod",0 +szOptTitle db "Ban Control",0 +szOptTitleW db "UnicodeUnic",0 +szOModule db "BanControl",0 +szOFlags db "Flags",0 +szOTime db "Time",0 +szOEnabled db "Enabled",0 +szONotOnList db "NotOnList",0 +szOCList db "CList",0 +szOShowHidden db "ShowHidden",0 +szOMetaContacts db "MetaContacts",0 +szOMetaCount db "NumContacts",0 +szOMetaLink db "MetaLink",0 + + ;tab captions +szTab1 db "Options",0 +szTab1W db "Unicode",0 +szTab2 db "Contacts",0 +szTab2W db "UnicodeU",0 + + ;IcoLib +szIlDesc db "Enabled",0 +szIlName db "banc_icon",0 + + ;other strings +szDtFormat db "HH':'mm",0 +szError db "Default error message",0 +szAllContacts db "** All contacts **",0 +szAllContactsW db "UnicodeUnicodeUnic",0 +szUnkContacts db "** Unknown contacts **",0 +szUnkContactsW db "UnicodeUnicodeUnicodeU",0 + + ;option control info +IDC_ETYPE_MESSAGE dd 40082 +IDC_ETYPE_MESSAGE_V dd EVENTTYPE_MESSAGE +IDC_ETYPE_URL dd 40083 +IDC_ETYPE_URL_V dd EVENTTYPE_URL +IDC_ETYPE_CONTACTS dd 40084 +IDC_ETYPE_CONTACTS_V dd EVENTTYPE_CONTACTS +IDC_ETYPE_ADDED dd 40085 +IDC_ETYPE_ADDED_V dd EVENTTYPE_ADDED +IDC_ETYPE_AUTHREQUEST dd 40086 +IDC_ETYPE_AUTHREQUEST_V dd EVENTTYPE_AUTHREQUEST +IDC_ETYPE_FILE dd 40087 +IDC_ETYPE_FILE_V dd EVENTTYPE_FILE + +.data? + ;option control hWnd's +HC_CLIST dd ? +HC_ENABLED dd ? +HC_STATUS_ONLINE dd ? +HC_STATUS_AWAY dd ? +HC_STATUS_DND dd ? +HC_STATUS_NA dd ? +HC_STATUS_OCCUPIED dd ? +HC_STATUS_FREECHAT dd ? +HC_STATUS_INVISIBLE dd ? +HC_STATUS_ONTHEPHONE dd ? +HC_STATUS_OUTTOLUNCH dd ? +HC_PROTO dd ? +HC_ETYPE_MESSAGE dd ? +HC_ETYPE_URL dd ? +HC_ETYPE_CONTACTS dd ? +HC_ETYPE_ADDED dd ? +HC_ETYPE_AUTHREQUEST dd ? +HC_ETYPE_FILE dd ? +HC_STARTTIME dd ? +HC_ENDTIME dd ? + +HC_SHOWHIDDEN dd ? + + ;empty string space +szGeneral db 256 DUP(?) + +.code +DllMain proc hInst:HINSTANCE, reason:DWORD, reserved1:DWORD + push hInst + pop hInstance ;save hWnd of the library + invoke GetModuleHandle, NULL + mov hApp, eax ;save hWnd of Miranda + + mov sPluginInfo.cbSize, sizeof PLUGININFO ;set the library's info + mov sPluginInfo.shortName, offset szShortNamev + push ddVersion + pop sPluginInfo.version + mov sPluginInfo.description, offset szDescription + mov sPluginInfo.author, offset szAuthor + mov sPluginInfo.authorEmail, offset szAthorEmail + mov sPluginInfo.copyright, offset szCopyright + mov sPluginInfo.homepage, offset szHomepage + + mov eax, TRUE + ret +DllMain Endp + +MirandaPluginInfo proc + mov eax, offset sPluginInfo ;return plugin info struct + ret +MirandaPluginInfo Endp + + ;internal miranda functions. Not necessary, but allow viewing them in the debugger +CallService proc lpServiceName:DWORD, wParam:DWORD, lParam:DWORD + pop ddRetStack + pop ddRetAddr + call sPluginLink.lpCallService + push ddRetAddr + push ddRetStack + ret +CallService endp + +ServiceExists proc lpServiceName:DWORD + pop ddRetStack + pop ddRetAddr + call sPluginLink.lpServiceExists + push ddRetAddr + push ddRetStack + ret +ServiceExists endp + +HookEvent proc lpHookName:DWORD, lpFunction:DWORD + pop ddRetStack + pop ddRetAddr + call sPluginLink.lpHookEvent + push ddRetAddr + push ddRetStack + ret +HookEvent endp + +UnhookEvent proc HookHandle:DWORD + pop ddRetStack + pop ddRetAddr + call sPluginLink.lpUnhookEvent + push ddRetAddr + push ddRetStack + ret +UnhookEvent endp + + ;call to Miranda translate module +Translate proc lpString:DWORD + LOCAL ddLng:DWORD + + mov eax, ddFlags + and eax, 8 + .IF eax==0 + IFDEF _UNICODE + mov ddLng, LANG_UNICODE + ELSE + mov ddLng, 0 + ENDIF + .ELSE + and ddFlags, -9 + mov ddLng, 0 + .ENDIF + invoke CallService, offset MS_LANGPACK_TRANSLATESTRING, ddLng, lpString ;translate the string + ret +Translate endp + + ;Just an info func. Shows a message or Default error if NULL +Error proc lpString:DWORD + .IF lpString==0 + mov lpString, offset szError + .ENDIF + invoke MessageBox, NULL, lpString, addr szShortName, MB_OK + ret +Error endp + +Load proc link:DWORD + invoke RtlMoveMemory, addr sPluginLink, link, sizeof PLUGINLINK ;get miranda proc struct + + IFDEF _UNICODE + invoke lstrcpy, offset szGeneral, offset szOptGroup + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szOptGroup, 7 + invoke lstrcpy, offset szGeneral, offset szOptTitle + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szOptTitle, 12 + invoke lstrcpy, offset szGeneral, offset szTab1 + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szTab1, 8 + invoke lstrcpy, offset szGeneral, offset szTab2 + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szTab2, 9 + invoke lstrcpy, offset szGeneral, offset szAllContacts + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szAllContacts, 19 + invoke lstrcpy, offset szGeneral, offset szUnkContacts + invoke MultiByteToWideChar, CP_ACP, MB_PRECOMPOSED, offset szGeneral, -1, offset szUnkContacts, 23 + ENDIF + + mov sSystemTime.wYear, 1870 + mov sSystemTime.wMonth, 1 + mov sSystemTime.wDay, 1 + mov sOptionsPage.cbSize, sizeof OPTIONSDIALOGPAGE ;set the option dialog's properties + invoke Translate, offset szOptTitle + IFDEF _UNICODE + mov sOptionsPage.flags, ODPF_UNICODE + ENDIF + mov sOptionsPage.pszTitle, eax + mov sOptionsPage.pfnDlgProc, offset TabOptions + mov sOptionsPage.pszTemplate, 100 + push hInstance + pop sOptionsPage.hInstance + push offset szOptGroup + pop sOptionsPage.pszGroup + + invoke HookEvent, offset ME_DB_EVENT_ADDED, offset Message ;set the message hook + mov hMsgHook, eax ;save hook hWnd + invoke HookEvent, offset ME_OPT_INITIALISE, offset OptInit ;set the options hook + mov hOptHook, eax ;save hook hWnd + invoke HookEvent, offset ME_SYSTEM_MODULESLOADED, offset MdLoaded ;set the ModulesLoaded hook + mov hMdLHook, eax ;save hook hWnd + + xor eax, eax + ret +Load Endp + +IcoLibEv proc C wParam:DWORD, lParam: DWORD + invoke SendMessage, hDlgWnd, WM_IMGLIST, 0, 0 + xor eax, eax + ret +IcoLibEv endp + +;############################## +; Runs when all modules are loaded +;############################## +MdLoaded proc C wParam:DWORD, lParam:DWORD + invoke UnhookEvent, hMdLHook ;unhook + + invoke ServiceExists, offset MS_UPDATE_REGISTER + .IF eax!=0 + mov sUpdate.cbSize, sizeof UPDATE ;initialize updater struct + mov sUpdate.szComponentName, offset szShortNamev + .IF ddBeta==0 + mov sUpdate.szVersionURL, offset szURL ;check if is Beta + .ENDIF + mov sUpdate.pbVersionPrefix, offset szURLKey + push ddURLKeyLen + pop sUpdate.cpbVersionPrefix + mov sUpdate.szUpdateURL, offset szDnURL + mov sUpdate.szBetaVersionURL, offset szBetaURL + mov sUpdate.pbBetaVersionPrefix, offset szBetaURLKey + push ddBetaURLKeyLen + pop sUpdate.cpbBetaVersionPrefix + mov sUpdate.szBetaUpdateURL, offset szBetaDnURL + mov sUpdate.pbVersion, offset szVersion + push ddVersionLen + pop sUpdate.cpbVersion + mov sUpdate.szBetaChangelogURL, offset szBetaChangelogURL + invoke CallService, offset MS_UPDATE_REGISTER, 0, offset sUpdate ;register updater service + .ENDIF + + ;registering icon in IcoLib + invoke ServiceExists, offset MS_SKIN2_ADDICON + .IF eax!=0 + invoke GetModuleFileNameA, hInstance, offset szGeneral, 255 + mov sSkinIconDesc.cbSize, sizeof SKINICONDESC + mov sSkinIconDesc.pszSection, offset szShortName + or ddFlags, 8 + invoke Translate, offset szIlDesc + mov sSkinIconDesc.pszDescription, eax + mov sSkinIconDesc.pszName, offset szIlName + mov sSkinIconDesc.pszDefaultFile, offset szGeneral + mov sSkinIconDesc.iDefaultIndex, -IDI_BAN + invoke CallService, offset MS_SKIN2_ADDICON, 0, offset sSkinIconDesc + invoke HookEvent, offset ME_SKIN2_ICONSCHANGED, offset IcoLibEv ;set the IconChanged hook + mov hIcoLibEv, eax ;save hook hWnd + .ENDIF + + xor eax, eax + ret +MdLoaded endp + + ;set CListControl style defaults +ResetListOptions proc hCList:DWORD + LOCAL Col, i:DWORD + + invoke SendMessage, hCList, CLM_SETBKBITMAP, 0, 0 + invoke GetSysColor, COLOR_WINDOW + mov Col, eax + invoke SendMessage, hCList, CLM_SETBKCOLOR, Col, 0 + invoke SendMessage, hCList, CLM_SETGREYOUTFLAGS, 0, 0 + invoke SendMessage, hCList, CLM_SETLEFTMARGIN, 2, 0 + invoke SendMessage, hCList, CLM_SETINDENT, 10, 0 + invoke GetSysColor, COLOR_WINDOWTEXT + mov Col, eax + mov i, FONTID_MAX + .WHILE i!=0 + invoke SendMessage, hCList, CLM_SETTEXTCOLOR, i, Col + dec i + .ENDW + mov sDBGetSetting.szModule, offset szOModule ;load the flags + mov sDBGetSetting.szSetting, offset szOShowHidden + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_DWORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, 0, offset sDBGetSetting + .IF eax==0 + .IF sDBVariant.VAR2!=0 + invoke GetWindowLong, hCList, GWL_STYLE + or eax, CLS_SHOWHIDDEN + invoke SetWindowLong, hCList, GWL_STYLE, eax + .ENDIF + .ENDIF + xor eax, eax + ret +ResetListOptions endp + + ;load per contact trigger settings from DB +SetAllContactIcons proc hCList:DWORD + LOCAL hContact, hItem, szProto, flags, flag:DWORD + + invoke CallService, offset MS_DB_CONTACT_FINDFIRST, 0, 0 + mov hContact, eax + invoke SendMessage, hCList, WM_TIMER, 14, 0 ;Note: This is a hack. Wait for the CList To be ready. Thanks to FYR + .WHILE hContact!=0 + invoke SendMessage, hCList, CLM_FINDCONTACT, hContact, 0 + mov hItem, eax + .IF eax!=0 + invoke CallService, offset MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 ;get PROTO for each contact + mov szProto, eax + .IF eax==0 + mov flag, 1 + mov flags, 1 + .ELSE + ;invoke IgnoreCheck, szProto ;Check PROTO Capabilities + mov flags, eax + mov sDBGetSetting.szModule, offset szOModule ;load settings + mov sDBGetSetting.szSetting, offset szOEnabled + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_WORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hContact, offset sDBGetSetting + .IF eax==0 + push sDBVariant.VAR2 + pop flag + .ELSE + mov flag, 1 + .ENDIF + .ENDIF + .IF flags!=0 ;finally set the necesarry image + xor eax, eax ;Use (MAKELPARAM "column", "image") instead of just 0 + invoke SendMessage, hCList, CLM_GETEXTRAIMAGE, hItem, eax + .IF eax==0FFh + .IF flag!=0 + mov flag, 1 + .ENDIF + MAKELPARAM 0, flag + invoke SendMessage, hCList, CLM_SETEXTRAIMAGE, hItem, eax + .ENDIF + .ENDIF + .ENDIF + invoke CallService, offset MS_DB_CONTACT_FINDNEXT, hContact, 0 + mov hContact, eax + .ENDW + ret +SetAllContactIcons endp + + ;Set group icons according to the contacts inside +SetListGroupIcons proc hCList:DWORD, hFirstItem:DWORD, hParentItem:DWORD, groupChildCount:DWORD + LOCAL typeOfFirst, iconOn, childCount, iImage, hItem, hChildItem:DWORD + + mov iconOn, 1 ;assume all are enabled + mov childCount, 0 + invoke SendMessage, hCList, CLM_GETITEMTYPE,hFirstItem, 0 + mov typeOfFirst, eax + + ;check groups + .IF typeOfFirst==CLCIT_GROUP + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=NULL + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_CHILD, hItem + mov hChildItem, eax + .IF eax!=0 + invoke SetListGroupIcons, hCList, hChildItem, hItem, addr childCount + .ENDIF + .IF iconOn!=0 + invoke SendMessage, hCList, CLM_GETEXTRAIMAGE, hItem, 0 + .IF eax==0 + mov iconOn, 0 + .ENDIF + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hItem + mov hItem, eax + .ENDW + + ;check contacts + .IF typeOfFirst==CLCIT_CONTACT + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=0 + invoke SendMessage, hCList, CLM_GETEXTRAIMAGE, hItem, 0 + .IF iconOn!=0 + .IF eax==0 + mov iconOn, 0 + .ENDIF + .ENDIF + .IF eax!=0FFh + inc childCount + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hItem + mov hItem, eax + .ENDW + + ;set group icons + .IF childCount==0 + mov eax, 0FFh + .ELSEIF iconOn==0 + mov eax, 0 + .ELSE + mov eax, 1 + .ENDIF + MAKELPARAM 0, eax + invoke SendMessage, hCList, CLM_SETEXTRAIMAGE, hParentItem, eax + .IF groupChildCount!=0 + mov eax, [groupChildCount] + add eax, childCount + mov [groupChildCount], eax + .ENDIF + ret +SetListGroupIcons endp + + ;set group child icons +SetAllChildIcons proc hCList:DWORD, hFirstItem:DWORD, iColumn:DWORD, iImage:DWORD + LOCAL typeOfFirst, iOldIcon, hItem, hChildItem:DWORD + + invoke SendMessage, hCList, CLM_GETITEMTYPE, hFirstItem, 0 + mov typeOfFirst, eax + + ;set icons for groups + .IF typeOfFirst==CLCIT_GROUP + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=0 + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_CHILD, hItem + mov hChildItem, eax + .IF hChildItem!=0 + invoke SetAllChildIcons, hCList, hChildItem, iColumn, iImage + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hItem + mov hItem, eax + .ENDW + + ;set icons for contacts + .IF typeOfFirst==CLCIT_CONTACT + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=0 + invoke SendMessage, hCList, CLM_GETEXTRAIMAGE, hItem, iColumn + mov iOldIcon, eax + .IF iOldIcon!=0FFh + mov eax, iImage + .IF iOldIcon!=eax + MAKELPARAM iColumn, iImage + invoke SendMessage, hCList, CLM_SETEXTRAIMAGE, hItem, eax + mov sDBGetSetting.szModule, offset szOMetaContacts ;load settings + mov sDBGetSetting.szSetting, offset szOMetaCount + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_WORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hItem, offset sDBGetSetting + .IF eax==0 + invoke MetaConClick, hItem, sDBVariant.VAR2, iImage + .ENDIF + .ENDIF + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hItem + mov hItem, eax + .ENDW + ret +SetAllChildIcons endp + + ;set icons to contacts Not on list +SetUnkChildIcons proc hCList:DWORD, hFirstItem:DWORD, iColumn:DWORD, iImage:DWORD + LOCAL typeOfFirst, iOldIcon, hItem, hChildItem:DWORD + + invoke SendMessage, hCList, CLM_GETITEMTYPE, hFirstItem, 0 + mov typeOfFirst, eax + + ;set icons for groups + .IF typeOfFirst==CLCIT_GROUP + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=0 + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_CHILD, hItem + mov hChildItem, eax + .IF hChildItem!=0 + invoke SetUnkChildIcons, hCList, hChildItem, iColumn, iImage + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTGROUP, hItem + mov hItem, eax + .ENDW + + ;set icons for contacts + .IF typeOfFirst==CLCIT_CONTACT + push hFirstItem + pop hItem + .ELSE + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hFirstItem + mov hItem, eax + .ENDIF + .WHILE hItem!=0 + invoke SendMessage, hCList, CLM_GETEXTRAIMAGE, hItem, iColumn + mov iOldIcon, eax + .IF iOldIcon!=0FFh + mov eax, iImage + .IF iOldIcon!=eax + mov sDBGetSetting.szModule, offset szOCList + mov sDBGetSetting.szSetting, offset szONotOnList + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_BYTE + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hItem, offset sDBGetSetting + .IF eax==0 + lea esi, sDBVariant.VAR2 + mov al, [esi] + .IF al!=0 + MAKELPARAM iColumn, iImage + invoke SendMessage, hCList, CLM_SETEXTRAIMAGE, hItem, eax + .ENDIF + .ENDIF + .ENDIF + .ENDIF + invoke SendMessage, hCList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, hItem + mov hItem, eax + .ENDW + ret +SetUnkChildIcons endp + +MetaConClick proc hContact:DWORD, iCount:DWORD, iValue: DWORD + dec iCount + .WHILE iCount!=-1 + invoke CallService, offset MS_MC_GETSUBCONTACT, hContact, iCount + .IF eax!=0 + mov ebx, eax + MAKELPARAM 0, 0 + invoke SendDlgItemMessage, hDlgWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, ebx, eax + .IF eax!= 0FFh + MAKELPARAM 0, iValue + invoke SendDlgItemMessage, hDlgWnd, IDC_CLIST, CLM_SETEXTRAIMAGE, ebx, eax + .ENDIF + .ENDIF + dec iCount + .ENDW + ret +MetaConClick endp + +MetaSubClick proc hContact:DWORD + LOCAL iVal, iCounter:DWORD + + invoke CallService, offset MS_MC_GETMETACONTACT, hContact, 0 + .IF eax!=0 + mov hContact, eax + mov sDBGetSetting.szModule, offset szOMetaContacts ;load settings + mov sDBGetSetting.szSetting, offset szOMetaCount + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_WORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hContact, offset sDBGetSetting + .IF eax==0 + push sDBVariant.VAR2 + pop iCounter + dec iCounter + mov iVal, 1 + .WHILE iCounter!=-1 + invoke CallService, offset MS_MC_GETSUBCONTACT, hContact, iCounter + .IF eax!=0 + mov ebx, eax + MAKELPARAM 0, 0 + invoke SendDlgItemMessage, hDlgWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, ebx, eax + .IF eax==0 + mov iVal, 0 + .ENDIF + .ENDIF + dec iCounter + .ENDW + .ENDIF + .ENDIF + MAKELPARAM 0, iVal + invoke SendDlgItemMessage, hDlgWnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, eax + ret +MetaSubClick endp + +;############################## +; Options hook proc +;############################## +OptInit proc C wParam:DWORD, lParam:DWORD + mov eax, wParam ;init the options dialog + invoke CallService, addr MS_OPT_ADDPAGE, eax, addr sOptionsPage + xor eax, eax + ret +OptInit Endp + +;############################## +; Message hook proc +;############################## +Message proc C wParam:DWORD, lParam:DWORD + LOCAL hContact:DWORD + + xor eax, eax + ret +Message Endp + +;############################## +; First tab event proc +;############################## +Options1 proc, dhWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD + .IF uMsg==WM_INITDIALOG ;if user opens options + invoke SetWindowPos, dhWnd, HWND_TOP, sDlgHdr.rcDisplay.left, sDlgHdr.rcDisplay.top, 0, 0, SWP_NOSIZE + .ELSEIF uMsg==WM_COMMAND ;if sth. happened in the dialog + .ENDIF + xor eax,eax + ret +Options1 endp + +;############################## +; Second tab event proc +;############################## +Options2 proc, dhWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD + LOCAL hContact, hItem, hitFlags, iImage, itemType, i:DWORD + + push dhWnd + pop hDlgWnd + .IF uMsg==WM_INITDIALOG + invoke SetWindowPos, dhWnd, HWND_TOP, sDlgHdr.rcDisplay.left, sDlgHdr.rcDisplay.top, 0, 0, SWP_NOSIZE + invoke GetDlgItem, dhWnd, IDC_SHOWHIDDEN + mov HC_SHOWHIDDEN, eax + mov sDBGetSetting.szModule, offset szOModule ;load the flags + mov sDBGetSetting.szSetting, offset szOShowHidden + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_DWORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, 0, offset sDBGetSetting + .IF eax==0 + .IF sDBVariant.VAR2!=0 + Invoke SendMessage, HC_SHOWHIDDEN, BM_SETCHECK, BST_CHECKED, 0 + .ENDIF + .ENDIF + invoke SendMessage, dhWnd, WM_IMGLIST, wParam, lParam + invoke GetDlgItem, dhWnd, IDC_CLIST + mov HC_CLIST, eax + invoke ResetListOptions, HC_CLIST + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_SETEXTRACOLUMNS, 1, 0 ;set no of icon columns + mov sClcInfoItem.cbSize, sizeof CLCINFOITEM ;add additional items + mov sClcInfoItem.flags, CLCIIF_GROUPFONT + invoke Translate, offset szAllContacts ;** All contacts ** + mov sClcInfoItem.pszText, eax + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_ADDINFOITEM, 0, addr sClcInfoItem + mov hItemAll, eax + invoke Translate, offset szUnkContacts ;** Unknown contacts ** + mov sClcInfoItem.pszText, eax + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_ADDINFOITEM, 0, addr sClcInfoItem + mov hItemUnk, eax + + invoke SetAllContactIcons, HC_CLIST ;Init control values + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + mov sDBGetSetting.szModule, offset szOModule ;load the flags + mov sDBGetSetting.szSetting, offset szONotOnList + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_DWORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, 0, offset sDBGetSetting + .IF eax==0 + .IF sDBVariant.VAR2!=0 + mov eax, 1 + .ENDIF + .ELSE + mov eax, 1 + .ENDIF + push eax + invoke SetUnkChildIcons, HC_CLIST, hItemUnk, 0, eax + pop eax + MAKELPARAM 0, eax + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hItemUnk, eax + .ELSEIF uMsg==WM_IMGLIST + invoke GetVersion ;check win version + .IF al==5 + .IF ah!=0 + mov eax, ILC_COLOR32 or ILC_MASK + .ELSEIF + mov eax, ILC_COLOR16 or ILC_MASK + .ENDIF + .ENDIF + invoke ImageList_Create, 16, 16, eax, 3, 3 ;create image list + mov hIml, eax + invoke LoadIcon, hApp, IDI_SMALLDOT ;add icon + push eax + invoke ImageList_AddIcon, hIml, eax + pop eax + invoke DeleteObject, eax + invoke CallService, offset MS_SKIN2_GETICON, 0, offset szIlName + invoke ImageList_AddIcon, hIml, eax + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_SETEXTRAIMAGELIST, 0, hIml ;link image list to CList + .ELSEIF uMsg==WM_SETFOCUS + invoke SetFocus, HC_CLIST + .ELSEIF uMsg==WM_COMMAND + mov eax, wParam + .IF lParam!=0 + .IF ax==IDC_SHOWHIDDEN + mov sDBWriteSetting.szModule, offset szOModule + mov sDBWriteSetting.szSetting, offset szOShowHidden + mov sDBWriteSetting.VAR1, DBVT_DWORD + invoke SendMessage, HC_SHOWHIDDEN, BM_GETCHECK, 0, 0 + .IF eax==BST_CHECKED + mov sDBWriteSetting.VAR2, 1 + invoke GetWindowLong, HC_CLIST, GWL_STYLE + or eax, CLS_SHOWHIDDEN + .ELSE + mov sDBWriteSetting.VAR2, 0 + invoke GetWindowLong, HC_CLIST, GWL_STYLE + mov ebx, -CLS_SHOWHIDDEN + dec ebx + and eax, ebx + .ENDIF + invoke SetWindowLong, HC_CLIST, GWL_STYLE, eax + invoke CallService, offset MS_DB_CONTACT_WRITESETTING, 0, offset sDBWriteSetting + invoke SendMessage, HC_CLIST, CLM_SETUSEGROUPS, 1, 0 + invoke SetAllContactIcons, HC_CLIST + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + .ENDIF + .ENDIF + .ELSEIF uMsg==WM_NOTIFY ;if sth changes + mov edi, lParam + assume edi:ptr NMHDR + .IF [edi].idFrom==IDC_CLIST + .IF [edi].code==CLN_NEWCONTACT + invoke SetAllContactIcons, HC_CLIST + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + .ELSEIF [edi].code==CLN_LISTREBUILT + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + .ELSEIF [edi].code==CLN_CONTACTMOVED + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + .ELSEIF [edi].code==CLN_OPTIONSCHANGED + invoke ResetListOptions, HC_CLIST + .ELSEIF [edi].code==NM_CLICK ;Click on the CList + assume edi:ptr NMCLISTCONTROL + .IF [edi].iColumn!=-1 + MAKELPARAM [edi].pt.x, [edi].pt.y + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_HITTEST, addr hitFlags, eax + mov hItem, eax + .IF hItem!=0 + and hitFlags, CLCHT_ONITEMEXTRA ;if click on icon, then analyze and edit + .IF hitFlags!=0 + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, hItem, [edi].iColumn + .IF eax==0 + mov iImage, 1 + .ELSE + mov iImage, 0 + .ENDIF + MAKELPARAM [edi].iColumn, 0 + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, hItem, eax + .IF eax!= 0FFh + MAKELPARAM [edi].iColumn, iImage + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hItem, eax + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETITEMTYPE, hItem, 0 + mov itemType, eax + .IF itemType==CLCIT_CONTACT ;if click on contact + MAKELPARAM [edi].iColumn, iImage + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hItem, eax + mov sDBGetSetting.szModule, offset szOMetaContacts ;load settings + mov sDBGetSetting.szSetting, offset szOMetaCount + mov sDBGetSetting.pValue, offset sDBVariant + mov sDBVariant.VAR1, DBVT_WORD + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hItem, offset sDBGetSetting + .IF eax==0 + ;is MetaContact + invoke MetaConClick, hItem, sDBVariant.VAR2, iImage + .ELSE + mov sDBGetSetting.szSetting, offset szOMetaLink + invoke CallService, offset MS_DB_CONTACT_GETSETTING, hItem, offset sDBGetSetting + .IF eax==0 + ;is subcontact + invoke MetaSubClick, hItem + .ENDIF + .ENDIF + .ENDIF + .IF itemType==CLCIT_INFO ;if click on extra item + mov eax, hItem + .IF eax==hItemAll + invoke SetAllChildIcons, HC_CLIST, hItem, [edi].iColumn, iImage + .ELSEIF eax==hItemUnk + invoke SetUnkChildIcons, HC_CLIST, hItem, [edi].iColumn, iImage + .ENDIF + .ENDIF + .IF itemType==CLCIT_GROUP ;if click on group + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_CHILD, hItem + mov hItem, eax + .IF hItem!=0 + invoke SetAllChildIcons, HC_CLIST, hItem, [edi].iColumn, iImage + .ENDIF + .ENDIF + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETNEXTITEM, CLGN_ROOT, 0 + invoke SetListGroupIcons, HC_CLIST, eax, hItemAll, NULL + invoke GetParent, dhWnd + invoke GetParent, eax + push eax + invoke SendMessage, eax, PSM_CHANGED, 0, 0 ;enable the Apply button + pop eax + invoke GetParent, eax + invoke SendMessage, eax, PSM_CHANGED, 0, 0 ;enable the Apply button + .ENDIF + .ENDIF + .ENDIF + .ENDIF + assume edi:ptr NMHDR + .ENDIF + .ELSEIF [edi].idFrom==0 + .IF [edi].code==PSN_APPLY ;if OK/Apply pressed. Save options + invoke CallService, addr MS_DB_CONTACT_FINDFIRST, 0, 0 + mov hContact, eax + .WHILE hContact!=0 + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0 + mov hItem, eax + .IF eax!=0 + xor eax, eax ;Use (MAKELPARAM "column", "image") instead of just 0 + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, hItem, eax + mov sDBWriteSetting.szModule, offset szOModule + mov sDBWriteSetting.szSetting, offset szOEnabled + mov sDBWriteSetting.VAR1, DBVT_DWORD + mov sDBWriteSetting.VAR2, eax + invoke CallService, offset MS_DB_CONTACT_WRITESETTING, hContact, offset sDBWriteSetting + .ENDIF + invoke CallService, addr MS_DB_CONTACT_FINDNEXT, hContact, 0 + mov hContact, eax + .ENDW + invoke SendDlgItemMessage, dhWnd, IDC_CLIST, CLM_GETEXTRAIMAGE, hItemUnk, 0 + mov sDBWriteSetting.szModule, offset szOModule + mov sDBWriteSetting.szSetting, offset szONotOnList + mov sDBWriteSetting.VAR1, DBVT_DWORD + mov sDBWriteSetting.VAR2, eax + invoke CallService, offset MS_DB_CONTACT_WRITESETTING, 0, offset sDBWriteSetting + .ENDIF + .ENDIF + assume edi:nothing + .ELSEIF uMsg==WM_DESTROY + invoke ImageList_Destroy, hIml ;Free used resources + .ENDIF + xor eax, eax + ret +Options2 endp + +TabOptions proc, dhWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD + push dhWnd + pop sDlgHdr.hDlg + .IF uMsg==WM_INITDIALOG ;if user opens options + mov ddInt, 0 + invoke InitCommonControls + invoke GetDlgItem, dhWnd, 1000 ;get hWnd of tabs control + mov sDlgHdr.hTab, eax + mov edi, offset sTCITEM ;insert tabs + mov eax, TCIF_TEXT + mov [edi], eax + invoke Translate, offset szTab1 ;translate Tab name + IFDEF _UNICODE + mov sTCITEM.pszText, eax + invoke SendMessage, sDlgHdr.hTab, TCM_INSERTITEMW, 0, addr sTCITEM + ELSE + mov sTCITEM.pszText, eax + invoke SendMessage, sDlgHdr.hTab, TCM_INSERTITEMA, 0, addr sTCITEM + ENDIF + mov sDlgHdr.hDisplay, NULL + + invoke SetRectEmpty, addr sDlgHdr.rcDisplay + invoke SendMessage, sDlgHdr.hTab, TCM_ADJUSTRECT, FALSE, addr sDlgHdr.rcDisplay + + invoke FindResource, hInstance, 101, RT_DIALOG ;load first tab in memory + invoke LoadResource, hInstance, eax + invoke LockResource, eax + invoke CreateDialogIndirectParam, hInstance, eax, sDlgHdr.hTab, Options1, NULL + mov sDlgHdr.hTab1, eax + mov sDlgHdr.hDisplay, eax + + invoke Translate, offset szTab2 ;translate Tab name + IFDEF _UNICODE + mov sTCITEM.pszText, eax + invoke SendMessage, sDlgHdr.hTab, TCM_INSERTITEMW, 1, addr sTCITEM + ELSE + mov sTCITEM.pszText, eax + invoke SendMessage, sDlgHdr.hTab, TCM_INSERTITEMA, 1, addr sTCITEM + ENDIF + invoke FindResource, hInstance, 102, RT_DIALOG ;load second tab in memory + invoke LoadResource, hInstance, eax + invoke LockResource, eax + invoke CreateDialogIndirectParam, hInstance, eax, sDlgHdr.hTab, Options2, NULL + mov sDlgHdr.hTab2, eax + invoke ShowWindow, sDlgHdr.hTab2, SW_HIDE + + mov sLngPackDialog.cbSize, sizeof LANGPACKTRANSLATEDIALOG + mov sLngPackDialog.flags, 0 + push dhWnd + pop sLngPackDialog.hwndDlg + mov sLngPackDialog.ignoreControls, 0 + invoke CallService, offset MS_LANGPACK_TRANSLATEDIALOG, LPTDF_NOTITLE, offset sLngPackDialog ;translate dialogs + + .ELSEIF uMsg==WM_NOTIFY + .IF wParam==1000 ;if message from tab control + mov edi, lParam + assume edi:ptr NMHDR + .IF [edi].code==TCN_SELCHANGE ;if tab changed + .IF sDlgHdr.hDisplay!=0 + invoke ShowWindow, sDlgHdr.hDisplay, SW_HIDE ;hide old tab + .ENDIF + invoke SendMessage, sDlgHdr.hTab, TCM_GETCURSEL, 0, 0 ;get current tab and show it + .IF eax==0 + mov eax, sDlgHdr.hTab1 + .ELSEIF eax==1 + mov eax, sDlgHdr.hTab2 + .ELSE + invoke Error, 0 + .ENDIF + mov sDlgHdr.hDisplay, eax + invoke ShowWindow, sDlgHdr.hDisplay, SW_SHOW + .ENDIF + assume edi:nothing + .ELSEIF + invoke SendMessage, sDlgHdr.hTab1, WM_NOTIFY, wParam, lParam + invoke SendMessage, sDlgHdr.hTab2, WM_NOTIFY, wParam, lParam + .ENDIF + .ENDIF + xor eax, eax + ret +TabOptions endp + +Unload proc + invoke UnhookEvent, hMsgHook ;unhook events and exit + invoke UnhookEvent, hOptHook + invoke UnhookEvent, hIcoLibEv + xor eax, eax + ret +Unload Endp + +End DllMain \ No newline at end of file diff --git a/BanControl/plugin/BanControl.def b/BanControl/plugin/BanControl.def new file mode 100644 index 0000000..dbb485e --- /dev/null +++ b/BanControl/plugin/BanControl.def @@ -0,0 +1,4 @@ +LIBRARY BanControl +EXPORTS MirandaPluginInfo +EXPORTS Load +EXPORTS Unload \ No newline at end of file diff --git a/BanControl/res/BanControl.aps b/BanControl/res/BanControl.aps new file mode 100644 index 0000000..59eef98 Binary files /dev/null and b/BanControl/res/BanControl.aps differ diff --git a/BanControl/res/BanControl.rc b/BanControl/res/BanControl.rc new file mode 100644 index 0000000..0c56743 --- /dev/null +++ b/BanControl/res/BanControl.rc @@ -0,0 +1,141 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +100 DIALOGEX 0, 0, 314, 240 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_VISIBLE +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + CONTROL "",IDT_MAIN,"SysTabControl32",0x0,1,1,311,237 +END + +101 DIALOGEX 0, 0, 305, 220 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN +END + +102 DIALOGEX 0, 0, 305, 220 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "To enable or disable the plugin for an individual contact, click on the icon to the right of it. Clicking on the group's icon, enables/disables the plugin for all the contacts in that group.", + IDC_STATIC,40,188,227,27 + CONTROL "",IDC_CLIST,"CListControl",WS_TABSTOP | 0x1c0,10,10,285, + 165,WS_EX_CLIENTEDGE + CONTROL "Show hidden",IDC_SHOWHIDDEN,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,20,177,195,10 +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,0,1,0 + PRODUCTVERSION 0,0,1,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", "BanControl" + VALUE "FileVersion", "0, 0, 1, 0" + VALUE "InternalName", "BanControl" + VALUE "LegalCopyright", "Copyright (C) 2007" + VALUE "OriginalFilename", "BanControl.dll" + VALUE "ProductName", "BanControl" + VALUE "ProductVersion", "0, 0, 1, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_BAN ICON "ban.ico" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/BanControl/res/ban.ico b/BanControl/res/ban.ico new file mode 100644 index 0000000..bb71cb9 Binary files /dev/null and b/BanControl/res/ban.ico differ diff --git a/BanControl/res/resource.h b/BanControl/res/resource.h new file mode 100644 index 0000000..c7d48ff --- /dev/null +++ b/BanControl/res/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by BanControl.rc +// +#define IDI_BAN 101 +#define IDT_MAIN 1000 +#define IDC_CLIST 3000 +#define IDC_SHOWHIDDEN 50071 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 201 +#endif +#endif diff --git a/BanControl/vsproj/BanControl.sln b/BanControl/vsproj/BanControl.sln new file mode 100644 index 0000000..61f5135 --- /dev/null +++ b/BanControl/vsproj/BanControl.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BanControl", "BanControl.vcproj", "{3018D9E2-8CFE-4E39-8834-72222BB648F4}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {3018D9E2-8CFE-4E39-8834-72222BB648F4}.Debug.ActiveCfg = Debug|Win32 + {3018D9E2-8CFE-4E39-8834-72222BB648F4}.Debug.Build.0 = Debug|Win32 + {3018D9E2-8CFE-4E39-8834-72222BB648F4}.Release.ActiveCfg = Release|Win32 + {3018D9E2-8CFE-4E39-8834-72222BB648F4}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/BanControl/vsproj/BanControl.vcproj b/BanControl/vsproj/BanControl.vcproj new file mode 100644 index 0000000..f66f0f4 --- /dev/null +++ b/BanControl/vsproj/BanControl.vcproj @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BanControl/vsproj/Resource.txt b/BanControl/vsproj/Resource.txt new file mode 100644 index 0000000..e69de29 diff --git a/BanControl/vsproj/build.bat b/BanControl/vsproj/build.bat new file mode 100644 index 0000000..c0b634b --- /dev/null +++ b/BanControl/vsproj/build.bat @@ -0,0 +1,34 @@ +@echo off + +echo Building Resources... +rc /r /fo ".\BanControl.res" ..\res\BanControl.rc + + +echo Building ANSI version... + +\masm32\bin\ml /nologo /c /coff /Zi /Fl /Fm /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DEBUG /DEBUGTYPE:CV /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib /OUT:"..\..\..\Miranda ANSI\plugins\BanControl.dll" BanControl.obj BanControl.res + if errorlevel 1 goto errlink + + +echo Building Unicode version... + +\masm32\bin\ml /nologo /D_UNICODE /c /coff /Zi /Fl /Fm /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DEBUG /DEBUGTYPE:CV /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib /OUT:"..\..\..\plugins\BanControl.dll" BanControl.obj BanControl.res + if errorlevel 1 goto errlink + +Echo Done. + +goto TheEnd +:errasm +echo _ +echo Assembly Error +goto TheEnd +:errlink +echo _ +echo Link Error + +:TheEnd +pause \ No newline at end of file diff --git a/BanControl/vsproj/clean.bat b/BanControl/vsproj/clean.bat new file mode 100644 index 0000000..19cd5ba --- /dev/null +++ b/BanControl/vsproj/clean.bat @@ -0,0 +1,49 @@ +@echo off + +echo Building Resources... +rc /r /fo ".\BanControl.res" ..\res\BanControl.rc + + +echo Building ANSI version... + +\masm32\bin\ml /nologo /c /coff /Zi /Fl /Fm /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DEBUG /DEBUGTYPE:CV /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib BanControl.obj BanControl.res + if errorlevel 1 goto errlink +move /Y BanControl.dll ..\bin\BanControlA_d.dll + +\masm32\bin\ml /nologo /c /coff /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib BanControl.obj BanControl.res + if errorlevel 1 goto errlink +move /Y BanControl.dll ..\bin\BanControlA.dll + + +echo Building Unicode version... + +\masm32\bin\ml /nologo /D_UNICODE /c /coff /Zi /Fl /Fm /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DEBUG /DEBUGTYPE:CV /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib BanControl.obj BanControl.res + if errorlevel 1 goto errlink +move /Y BanControl.dll ..\bin\BanControlW_d.dll + +\masm32\bin\ml /nologo /D_UNICODE /c /coff /Cp ..\plugin\BanControl.asm + if errorlevel 1 goto errasm +\masm32\bin\Link /nologo /DLL /DEF:..\plugin\BanControl.def /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib BanControl.obj BanControl.res + if errorlevel 1 goto errlink +move /Y BanControl.dll ..\bin\BanControlW.dll + +Echo Done. +cd + +goto TheEnd +:errasm +echo _ +echo Assembly Error +goto TheEnd +:errlink +echo _ +echo Link Error + +:TheEnd +pause \ No newline at end of file -- cgit v1.2.3