-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: urcd
action: commit
revision:
path_from:
revision_from: 8db4296d253013647b22e67d2164bc484c881fb9:
path_to:
revision_to:

git.thebackupbox.net

urcd

git://git.thebackupbox.net/urcd

commit 8db4296d253013647b22e67d2164bc484c881fb9
Author: root <root@d3v11.ano>
Date:   Sat Dec 29 17:36:27 2012 +0000

    [src/urcd.pyx] prioritized parsing ; JOIN cleanup

diff --git a/src/urcd.pyx b/src/urcd.pyx

index f281b209ecfc63d56938887876e8e202e9a63c84..

index ..25be59d06f7a005c4a822b0fa3092cb5da7da3f4 100644

--- a/src/urcd.pyx
+++ b/src/urcd.pyx
@@ -122,17 +122,6 @@ while 1:

       continue

-    # /PART
-    if re.search('^PART [#\w,]+$',buffer.upper()):
-
-      dst = buffer.split(' ')[1]
-
-      for dst in dst.split(','):
-        if dst in channels:
-          os.write(1,':'+nick+'!'+user+'@'+serv+' PART '+dst+' :\n')
-          channels.remove(dst)
-      continue
-
     # /PING
     if re.search('^PING :?[\w.]+$',buffer.upper()):

@@ -141,23 +130,6 @@ while 1:
       os.write(1,'PONG '+dst+'\n')
       continue

-    # /JOIN
-    if re.search('^JOIN [#\w,]+$',buffer.upper()):
-
-      dst = buffer.split(' ',1)[1].lower()
-
-      for dst in dst.split(','):
-        if dst in channels:
-          continue
-        channels.append(dst)
-        os.write(1,
-          ':'+nick+'!'+user+'@'+serv+' JOIN :'+dst+'\n'
-          ':'+serv+' 332 '+nick+' '+dst+' :\n'
-          ':'+serv+' 333 '+nick+' '+dst+' '+nick+' '+str(int(time.time()))+'\n'
-          ':'+serv+' 353 '+nick+' = '+dst+' :'+nick+'\n'
-        )
-      continue
-
     # /MODE #channel [<arg>,...]
     if re.search('^MODE #\w+( [-+a-zA-Z]+)?$',buffer.upper()):

@@ -195,6 +167,12 @@ while 1:
       os.write(1,':'+serv+' 306 '+nick+' :HB, :-)\n')
       continue

+    # /WHO
+    if re.search('^WHO .+',buffer.upper()):
+      cmd = buffer.split(' ')[1]
+      os.write(1,':'+serv+' 315 '+nick+' '+cmd+' :EOF WHO\n')
+      continue
+
     # /INVITE
     if re.search('^INVITE \w+ #\w+$',buffer.upper()):

@@ -211,10 +189,31 @@ while 1:
           pass
       continue

-    # /WHO
-    if re.search('^WHO .+',buffer.upper()):
-      cmd = buffer.split(' ')[1]
-      os.write(1,':'+serv+' 315 '+nick+' '+cmd+' :EOF WHO\n')
+    # /JOIN
+    if re.search('^JOIN [#\w,]+$',buffer.upper()):
+
+      dst = buffer.split(' ',1)[1].lower()
+
+      for dst in dst.split(','):
+        if dst in channels:
+          continue
+        channels.append(dst)
+        os.write(1,
+          ':'+nick+'!'+user+'@'+serv+' JOIN :'+dst+'\n'
+          ':'+serv+' 366 '+nick+' '+dst+' :EOF NAMES\n'
+          ':'+serv+' 353 '+nick+' = '+dst+' :'+nick+'\n'
+        )
+      continue
+
+    # /PART
+    if re.search('^PART [#\w,]+$',buffer.upper()):
+
+      dst = buffer.split(' ')[1]
+
+      for dst in dst.split(','):
+        if dst in channels:
+          os.write(1,':'+nick+'!'+user+'@'+serv+' PART '+dst+' :\n')
+          channels.remove(dst)
       continue

     if re.search('^QUIT ',buffer.upper()):

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 16:32:30 2024