[IRCServices] 5.1 InspIRCd protocol

Casey caseyclaydon at fastmail.com.au
Mon Sep 10 18:28:36 PDT 2007


getting patch unexpectedly ends in middle of line


[root at Vigor10 ircservices-5.1pre6]# patch -p0 <inspircd-patch.txt
patching file modules/protocol/inspircd.c
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 1038 with fuzz 1.
[root at Vigor10 ircservices-5.1pre6]# patch -p0 <messages-patch.txt
patching file messages.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 75 with fuzz 1.
[root at Vigor10 ircservices-5.1pre6]#



Andrew Church wrote:
> Sorry--that should have been "patch -p0", not "patch -p".
>
>   --Andrew Church
>     achurch at achurch.org
>     http://achurch.org/
>
>   
>> the patch command is not working for me
>>
>> I made a text file and called it inspircd-patch.txt and
>> messages-patch.txt, and copied the patch txt files to the
>> ircservices-5.1pre6 directory
>>
>> I did patch -p <inspircd/messages-patch.txt
>>
>> [casey at Vigor10 ircservices-5.1pre6]$ patch -p <inspircd-patch.txt
>> patch: option requires an argument -- p
>> patch: Try `patch --help' for more information.
>> [casey at Vigor10 ircservices-5.1pre6]$
>>
>>
>>
>> I have this in the patch txt files
>>
>>
>>
>> Index: modules/protocol/inspircd.c
>> ===================================================================
>> RCS file: /var/local/cvsroot/ircservices/modules/protocol/inspircd.c,v
>> retrieving revision 2.9
>> diff -u -r2.9 inspircd.c
>> --- modules/protocol/inspircd.c 3 Sep 2007 11:26:34 -0000 2.9
>> +++ modules/protocol/inspircd.c 10 Sep 2007 12:48:07 -0000
>> @@ -332,8 +332,16 @@
>> User *u = get_user(av[2]);
>> if (c && u)
>> clear_channel(c, CLEAR_BANS, u);
>> - } else {
>> - do_cmode(source, ac, av);
>> + } else if (ac >= 3) {
>> + char modestr[BUFSIZE];
>> + av[1] = av[0]; /* Remove the timestamp parameter */
>> + if (av[2][0] != '+' && av[2][0] != '-') {
>> + /* InspIRCd seems to omit the leading '+' when sending
>> + * initial modes for the channel */
>> + snprintf(modestr, sizeof(modestr), "+%s", av[2]);
>> + av[2] = modestr;
>> + }
>> + do_cmode(source, ac-1, av+1);
>> }
>> } else {
>> if (ac < 2)
>> @@ -1030,7 +1038,7 @@
>> {
>> protocol_name = "InspIRCd";
>> protocol_version = "1.1+";
>> - protocol_features = PF_SZLINE | PF_SVSJOIN | PF_MODETS_FIRST;
>> + protocol_features = PF_SZLINE | PF_SVSJOIN;
>> protocol_nickmax = 30;
>>
>> if (!register_messages(inspircd_messages)) {
>>
>>
>>
>>
>>
>>
>>
>> Index: messages.c
>> ===================================================================
>> RCS file: /var/local/cvsroot/ircservices/messages.c,v
>> retrieving revision 2.46
>> diff -u -r2.46 messages.c
>> --- messages.c 23 Aug 2007 04:45:42 -0000 2.46
>> +++ messages.c 10 Sep 2007 14:09:47 -0000
>> @@ -75,7 +75,7 @@
>> if (!*source) {
>> log("Source missing from JOIN message");
>> return;
>> - } else if (ac != 1) {
>> + } else if (ac < 1) {
>> return;
>> }
>> do_join(source, ac, av);
>>
>>
>>
>>
>>
>>
>>
>> Andrew Church wrote:
>>     
>>>> where in inspircd.c do I put in the patch
>>>>     
>>>>         
>>> Use the "patch" command to apply it.  Save the message to a file (for
>>> example "file.txt"), then go to the top Services source directory and
>>> enter the command "patch -p <file.txt" (make sure you give the proper
>>> path to the file).
>>>
>>>   --Andrew Church
>>>     achurch at achurch.org
>>>     http://achurch.org/
>>> ------------------------------------------------------------------
>>> To unsubscribe or change your subscription options, visit:
>>> http://lists.ircservices.za.net/mailman/listinfo/ircservices
>>>   
>>>       
>> ------------------------------------------------------------------
>> To unsubscribe or change your subscription options, visit:
>> http://lists.ircservices.za.net/mailman/listinfo/ircservices
>>     
> ------------------------------------------------------------------
> To unsubscribe or change your subscription options, visit:
> http://lists.ircservices.za.net/mailman/listinfo/ircservices
>