All pastes #801498 Raw Edit

Vermischtes

public text v1 · immutable
#801498 ·published 2007-11-29 09:55 UTC
rendered paste body
  if ($cmd eq "end") { print REPLY "END OF COMMANDS\n"; last; }
  elsif ($cmd =~ /^-/ &&
	   (!defined($hdrs{'content-type'}) ||
	    $hdrs{'content-type'} !~ /multipart/i))
  {
	# treat lines beginning with "-" as END only if this is NOT a MIME
	# multipart msg.  MIME messages should have "Content-Type:"
	# headers, and multipart messages should have the string
	# "multipart" somewhere in that header.  If we just look for
	# Content-Type: we trap messages with Content-Type: text/plain,
	# which is pretty common these days.
	print REPLY "END OF COMMANDS\n";
	last;
  } else {
    $retval = my_custom_func(foo, bar);
    if ('OK' == $retval) {
      if ($cmd eq "subscribe") { &do_subscribe(@parts); }
      elsif ($cmd eq "unsubscribe") { &do_unsubscribe(@parts); }
      elsif ($cmd eq "signoff") { &do_unsubscribe(@parts); }
      elsif ($cmd eq "cancel") { &do_unsubscribe(@parts); }
      elsif ($cmd eq "approve") { &do_approve(@parts); }
      elsif ($cmd eq "passwd") { &do_passwd(@parts); }
      elsif ($cmd eq "which") { &do_which(@parts); }
      elsif ($cmd eq "who") { &do_who(@parts); }
      elsif ($cmd eq "info") { &do_info(@parts); }
      elsif ($cmd eq "newinfo") { &do_newinfo(@parts); }
      elsif ($cmd eq "intro") { &do_intro(@parts); }
      elsif ($cmd eq "newintro") { &do_newintro(@parts); }
      elsif ($cmd eq "config") { &do_config(@parts); }
      elsif ($cmd eq "newconfig") { &do_newconfig(@parts); }
      elsif ($cmd eq "writeconfig") { &do_writeconfig(@parts); }
      elsif ($cmd eq "mkdigest") { &do_mkdigest(@parts); }
      elsif ($cmd eq "lists") { &do_lists(@parts); }
      elsif ($cmd eq "help") { &do_help(@parts); }
      elsif ($cmd eq "get") { &do_get(@parts); }
      elsif ($cmd eq "index") { &do_index(@parts); }
      elsif ($cmd eq "auth") { &do_auth(@parts); }
      else {
	&squawk("Command '$cmd' not recognized.");
	$count--;	# if we get to here, it wasn't really a command
      }
    } else {
      print "idite v zhopu\n";
    }