Sfoglia il codice sorgente

* Improvments to 'make sort'
* Removed #wraith only join in shouljoin()


svn: 414

Bryan Drewery 22 anni fa
parent
commit
f6ab78874c
5 ha cambiato i file con 47 aggiunte e 58 eliminazioni
  1. 8 3
      Makefile.in
  2. 9 1
      build
  3. 6 51
      misc/help.txt
  4. 2 2
      src/chanprog.c
  5. 22 1
      src/sorthelp.c

+ 8 - 3
Makefile.in

@@ -60,11 +60,11 @@ MAKE_DHUB = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \
 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
 'EGGEXEC=$(HUBEXEC)' 'EGGBUILD=(debug hub)' 'MODOBJS=mod/*.o'
 'EGGEXEC=$(HUBEXEC)' 'EGGBUILD=(debug hub)' 'MODOBJS=mod/*.o'
 
 
-MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'STRIP=$(STRIP)' \
-'CFLGS=$(CFLGS)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' 'LD=$(LD)'
+MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'STRIP=touch' \
+'CFLGS=$(DEBCFLAGS) $(CFLGS)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' 'LD=$(LD) -g'
 
 
 MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
 MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
-'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)'
+'STRIP=$(STRIP)' 'CFLGS=$(DEBCFLAGS) $(CFLGS)'
 
 
 MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
 MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
 
 
@@ -143,6 +143,11 @@ salt: pack/salt.h makesalt stringfix
 	fi)
 	fi)
 
 
 sort: sorthelp
 sort: sorthelp
+	@(if test "x`tail -n 1 misc/help.txt`" != "x::end"; then \
+	echo "::end" >> misc/help.txt; \
+	fi)
+#	@(sed misc/help.txt -e "s/^$$/ /" > help~ && mv -f help~ misc/help.txt) || rm -f help~
+	@(sed -r -e :a -e 's/^$$/ /' -e '$$!N;s/^ \n:/:/;ta' -e 'P;D' misc/help.txt > help~ && mv -f help~ misc/help.txt) || rm -f help~
 	@cp -f misc/help.txt help.txt~
 	@cp -f misc/help.txt help.txt~
 	@(src/sorthelp misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
 	@(src/sorthelp misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
 	@rm -f help.txt~
 	@rm -f help.txt~

+ 9 - 1
build

@@ -1,4 +1,12 @@
-#!/bin/sh
+#! /bin/sh
+#This is a crappy hack
+#better to use first arg check
+if ! test -f /tmp/.sh; then
+  touch /tmp/.sh
+  bash $0 ${1+"$@"}
+  rm /tmp/.sh
+  exit 0
+fi
 
 
 
 
 # Awk out the version from source
 # Awk out the version from source

+ 6 - 51
misc/help.txt

@@ -7,7 +7,12 @@
    reason. Ban time has to be expressed in days, hours, and/or minutes.
    reason. Ban time has to be expressed in days, hours, and/or minutes.
  
  
 See also: bans, -ban, stick, unstick
 See also: bans, -ban, stick, unstick
-
+::+chan
+### %b+chan%b <channel> [options]
+    Adds a channel to the bot's channel list. If options are specified, the 
+    channel will be configured with the options.
+ 
+See also: -chan, chanset, chaninfo
 ::+exempt
 ::+exempt
 ###  %b+exempt%b <hostmask> [channel] [%%<XdXhXm>] [comment]
 ###  %b+exempt%b <hostmask> [channel] [%%<XdXhXm>] [comment]
    Adds an exempt to the list of exempts stored on the bot, with optional
    Adds an exempt to the list of exempts stored on the bot, with optional
@@ -16,7 +21,6 @@ See also: bans, -ban, stick, unstick
    Exempt time has to be expressed in days, hours, and/or minutes.
    Exempt time has to be expressed in days, hours, and/or minutes.
  
  
 See also: exempts, -exempt, stick, unstick
 See also: exempts, -exempt, stick, unstick
-
 ::+host
 ::+host
 ###  %b+host%b [handle] <hostmask>
 ###  %b+host%b [handle] <hostmask>
    Adds a hostmask to a user's user record. Hostmasks are used to identify your
    Adds a hostmask to a user's user record. Hostmasks are used to identify your
@@ -24,7 +28,6 @@ See also: exempts, -exempt, stick, unstick
    YOUR user record.
    YOUR user record.
  
  
 See also: -host
 See also: -host
-
 ::+ignore
 ::+ignore
 ###  %b+ignore%b <hostmask> [%%<XdXhXm>] [comment]
 ###  %b+ignore%b <hostmask> [%%<XdXhXm>] [comment]
    Adds an ignore to the list of ignores stored on the bot, with optional
    Adds an ignore to the list of ignores stored on the bot, with optional
@@ -32,7 +35,6 @@ See also: -host
    creator. Ignore time has to be expressed in days, hours, and/or minutes.
    creator. Ignore time has to be expressed in days, hours, and/or minutes.
  
  
 See also: -ignore, ignores
 See also: -ignore, ignores
-
 ::+invite
 ::+invite
 ###  %b+invite%b <hostmask> [channel] [%%<XdXhXm>] [comment]
 ###  %b+invite%b <hostmask> [channel] [%%<XdXhXm>] [comment]
    Adds an invite to the list of invites stored on the bot, with optional
    Adds an invite to the list of invites stored on the bot, with optional
@@ -41,21 +43,18 @@ See also: -ignore, ignores
    Invite time has to be expressed in days, hours, and/or minutes.
    Invite time has to be expressed in days, hours, and/or minutes.
  
  
 See also: invites, -invite, stick, unstick
 See also: invites, -invite, stick, unstick
-
 ::+user
 ::+user
 ###  %b+user%b <handle> [hostmask]
 ###  %b+user%b <handle> [hostmask]
    Creates a new user record for the handle given. The new user record will
    Creates a new user record for the handle given. The new user record will
    have no flags, an optional hostmask, and a random pass/secpass.
    have no flags, an optional hostmask, and a random pass/secpass.
  
  
 See also: -user, +host, -host%(hub)%{+n}, newleaf
 See also: -user, +host, -host%(hub)%{+n}, newleaf
-
 :hub:-bot
 :hub:-bot
 ###  %b-bot%b <bot>
 ###  %b-bot%b <bot>
    This is exactly the same as %b'%d-user'%b (it removes a user record). It is
    This is exactly the same as %b'%d-user'%b (it removes a user record). It is
    included for convenience.
    included for convenience.
  
  
 See also: +user, -user%{+n}, newleaf
 See also: +user, -user%{+n}, newleaf
-
 ::-host
 ::-host
 ###  %b-host%b <hostmask>
 ###  %b-host%b <hostmask>
    Removes a host from your handle.
    Removes a host from your handle.
@@ -65,27 +64,22 @@ See also: +user, -user%{+n}, newleaf
 %{-}
 %{-}
  
  
 See also: +host
 See also: +host
-
 ::-ignore
 ::-ignore
 ###  %b-ignore%b <hostmask/number>
 ###  %b-ignore%b <hostmask/number>
    Removes the specified ignore from the list of ignores stored on the bot. You
    Removes the specified ignore from the list of ignores stored on the bot. You
    may also reference the ignore by the number shown by the 'ignores' command.
    may also reference the ignore by the number shown by the 'ignores' command.
  
  
 See also: +ignore, ignores
 See also: +ignore, ignores
-
 ::-user
 ::-user
 ###  %b-user%b <handle>
 ###  %b-user%b <handle>
    Removes the specified handle's user record.
    Removes the specified handle's user record.
  
  
 See also: +user%(hub)%{+a}, -bot%{+n}, newleaf
 See also: +user%(hub)%{+a}, -bot%{+n}, newleaf
-
 ::addlog
 ::addlog
 ###  %baddlog%b <text>
 ###  %baddlog%b <text>
    Adds your comment to the bot's logfile. Bot masters can go back later and
    Adds your comment to the bot's logfile. Bot masters can go back later and
    review the log, and will see your comment (with your handle attached). This
    review the log, and will see your comment (with your handle attached). This
    is useful for explaining confusing activity.
    is useful for explaining confusing activity.
- 
-
 ::away
 ::away
 ###  %baway%b [reason]
 ###  %baway%b [reason]
    Marks you as "away" on the party line. Your away message will show up in
    Marks you as "away" on the party line. Your away message will show up in
@@ -96,13 +90,11 @@ See also: +user%(hub)%{+a}, -bot%{+n}, newleaf
    itself.
    itself.
  
  
 See also: back
 See also: back
-
 ::back
 ::back
 ###  %bback%b
 ###  %bback%b
    This marks you as no longer away on the party line.
    This marks you as no longer away on the party line.
  
  
 See also: away
 See also: away
-
 :hub:backup
 :hub:backup
 ###  %bbackup%b
 ###  %bbackup%b
    This makes the bot write a backup of its entire user list to the disk. 
    This makes the bot write a backup of its entire user list to the disk. 
@@ -110,7 +102,6 @@ See also: away
    settings.
    settings.
  
  
 See also: reload, save
 See also: reload, save
-
 :hub:binds
 :hub:binds
 ###  %bbinds%b [type/match] [all]
 ###  %bbinds%b [type/match] [all]
    Shows the Tcl bindings in effect, in a list similar to this:
    Shows the Tcl bindings in effect, in a list similar to this:
@@ -130,14 +121,12 @@ See also: reload, save
    view more binds by adding 'all' to the end of the command.
    view more binds by adding 'all' to the end of the command.
  
  
 See also: tcl
 See also: tcl
-
 :hub:boot
 :hub:boot
 ###  %bboot%b <handle[@bot]> [reason]
 ###  %bboot%b <handle[@bot]> [reason]
    Kicks a user off the party line and displays the reason, if you specify
    Kicks a user off the party line and displays the reason, if you specify
    one. You can also specify a bot, and attempt to boot someone from another
    one. You can also specify a bot, and attempt to boot someone from another
    bot on the botnet, though it may be rejected if that bot does not allow
    bot on the botnet, though it may be rejected if that bot does not allow
    remote boots. You can not boot a bot owner.
    remote boots. You can not boot a bot owner.
-
 :hub:botinfo
 :hub:botinfo
 ###  %bbotinfo%b
 ###  %bbotinfo%b
    Requests information from every bot currently on the botnet. Each bot should
    Requests information from every bot currently on the botnet. Each bot should
@@ -145,7 +134,6 @@ See also: tcl
    channels, and uptime.
    channels, and uptime.
  
  
 See also: %{+n}bottree, vbottree%{+m}, bots
 See also: %{+n}bottree, vbottree%{+m}, bots
-
 :hub:bots
 :hub:bots
 ###  %bbots%b
 ###  %bbots%b
    Shows the list of bots currently on the botnet.
    Shows the list of bots currently on the botnet.
@@ -155,7 +143,6 @@ See also: %{+n}bottree, vbottree%{+m}, bots
    bot. %{+n}Use %b'%dwho'%b or %b'%dbottree'%b for that information.%{-}
    bot. %{+n}Use %b'%dwho'%b or %b'%dbottree'%b for that information.%{-}
  
  
 See also: downbots%{+n}, bottree, vbottree%{-}, botinfo
 See also: downbots%{+n}, bottree, vbottree%{-}, botinfo
-
 :hub:bottree
 :hub:bottree
 ###  %bbottree%b
 ###  %bbottree%b
    Shows a tree-format diagram of the bots currently on the botnet. It's just a
    Shows a tree-format diagram of the bots currently on the botnet. It's just a
@@ -163,7 +150,6 @@ See also: downbots%{+n}, bottree, vbottree%{-}, botinfo
    are sharing, a + will be indicated, or a ? if nothing is known.
    are sharing, a + will be indicated, or a ? if nothing is known.
  
  
 See also: bots, downbots, botinfo, vbottree
 See also: bots, downbots, botinfo, vbottree
-
 :hub:chaddr
 :hub:chaddr
 ###  %bchaddr%b <bot> <address[:bot port[/user port]]>
 ###  %bchaddr%b <bot> <address[:bot port[/user port]]>
    Changes the address for a bot. This is the address your bot will try to
    Changes the address for a bot. This is the address your bot will try to
@@ -175,7 +161,6 @@ See also: bots, downbots, botinfo, vbottree
 %{-}
 %{-}
  
  
 See also: link
 See also: link
-
 ::chat
 ::chat
 ###  %bchat%b <on/off>
 ###  %bchat%b <on/off>
 ###  %bchat%b <[*]channel number/name>
 ###  %bchat%b <[*]channel number/name>
@@ -191,7 +176,6 @@ See also: link
    If you prefix the channel with a '*', you will join a local channel.
    If you prefix the channel with a '*', you will join a local channel.
  
  
 See also: console
 See also: console
-
 ::chattr
 ::chattr
 ###  %bchattr%b <handle> [flags] [channel]
 ###  %bchattr%b <handle> [flags] [channel]
    This lets you view and change the flags for a user.
    This lets you view and change the flags for a user.
@@ -214,14 +198,12 @@ See also: console
           You must remove the permanent owner in the binary.
           You must remove the permanent owner in the binary.
  
  
 See also: whois
 See also: whois
-
 :hub:chhandle
 :hub:chhandle
 ###  %bchhandle%b <oldhandle> <newhandle>
 ###  %bchhandle%b <oldhandle> <newhandle>
    Changes the handle of a user. For example, to change the handle of user
    Changes the handle of a user. For example, to change the handle of user
    'gavroche' to 'jamie', you would use 'chhandle gavroche jamie'.
    'gavroche' to 'jamie', you would use 'chhandle gavroche jamie'.
  
  
 See also: chpass%{+n}, chsecpass
 See also: chpass%{+n}, chsecpass
-
 :hub:chpass
 :hub:chpass
 ###  %bchpass%b <handle> [newpassword]
 ###  %bchpass%b <handle> [newpassword]
    Changes a user's password. If you do not specify the new password, the user
    Changes a user's password. If you do not specify the new password, the user
@@ -230,13 +212,11 @@ See also: chpass%{+n}, chsecpass
    will be used.
    will be used.
  
  
 See also: chhandle%{+n}, chsecpass
 See also: chhandle%{+n}, chsecpass
-
 ::comment
 ::comment
 ###  %bcomment%b <user> <comment>
 ###  %bcomment%b <user> <comment>
    Creates or changes the comment field for a user. The comment field can only
    Creates or changes the comment field for a user. The comment field can only
    be seen via 'whois' or 'match'. Non-masters cannot see the comment field.
    be seen via 'whois' or 'match'. Non-masters cannot see the comment field.
    Using the comment 'none' will clear a user's comment.
    Using the comment 'none' will clear a user's comment.
-
 :hub:dccstat
 :hub:dccstat
 ###  %bdccstat%b
 ###  %bdccstat%b
    Displays a table-format list of all "dcc" connections in use on the bot.
    Displays a table-format list of all "dcc" connections in use on the bot.
@@ -290,19 +270,16 @@ See also: chhandle%{+n}, chsecpass
      %bI%b  bot is currently in the 'linking' stage
      %bI%b  bot is currently in the 'linking' stage
      %bA%b  bot is being aggressively shared with
      %bA%b  bot is being aggressively shared with
    For 'CHAT' users, the party-line channel is also listed.
    For 'CHAT' users, the party-line channel is also listed.
-
 ::debug
 ::debug
 ###  %bdebug%b
 ###  %bdebug%b
    Display a dump of memory allocation information, assuming the bot was
    Display a dump of memory allocation information, assuming the bot was
    compiled with memory debugging. It's useless to anyone but developers
    compiled with memory debugging. It's useless to anyone but developers
    trying to find memory leaks.
    trying to find memory leaks.
-
 ::die
 ::die
 ###  %bdie%b [reason]
 ###  %bdie%b [reason]
    This kills the bot. The bot goes offline immediately, logging who issued
    This kills the bot. The bot goes offline immediately, logging who issued
    the 'die' command. You shouldn't have to use this too often. If you specify
    the 'die' command. You shouldn't have to use this too often. If you specify
    a reason, it is logged, otherwise the reason is "authorized by <handle>".
    a reason, it is logged, otherwise the reason is "authorized by <handle>".
-
 ::echo
 ::echo
 ###  %becho%b <on/off>
 ###  %becho%b <on/off>
    Specifies whether you want your messages echoed back to you. If it's on,
    Specifies whether you want your messages echoed back to you. If it's on,
@@ -310,7 +287,6 @@ See also: chhandle%{+n}, chsecpass
    just like everyone else will see it. If it's off, then it won't happen.
    just like everyone else will see it. If it's off, then it won't happen.
  
  
 See also: color
 See also: color
-
 ::fixcodes
 ::fixcodes
 ### %bfixcodes%b
 ### %bfixcodes%b
      This is for use in situations where the bot gets mixed up about the type
      This is for use in situations where the bot gets mixed up about the type
@@ -319,7 +295,6 @@ See also: color
      "Local time is now 17:17" for example instead of "Local time is
      "Local time is now 17:17" for example instead of "Local time is
      now 17:17". Use this to turn telnet codes on or off/change the display
      now 17:17". Use this to turn telnet codes on or off/change the display
      mode.
      mode.
-
 ::handle
 ::handle
 ###  %bhandle%b <new-handle>
 ###  %bhandle%b <new-handle>
    Changes your handle on the bot. This is the handle (nickname) that the
    Changes your handle on the bot. This is the handle (nickname) that the
@@ -327,7 +302,6 @@ See also: color
    bot.
    bot.
  
  
 See also: newpass%{+m}, %(hub)chhand, chpass%{+n}, chsecpass
 See also: newpass%{+m}, %(hub)chhand, chpass%{+n}, chsecpass
-
 ::ignores
 ::ignores
 ###  %bignores%b [wildcard]
 ###  %bignores%b [wildcard]
    Shows a list of hostmasks from which the bot is currently ignoring msgs,
    Shows a list of hostmasks from which the bot is currently ignoring msgs,
@@ -355,14 +329,12 @@ See also: newpass%{+m}, %(hub)chhand, chpass%{+n}, chsecpass
    that match against your wildcard.
    that match against your wildcard.
  
  
 See also: +ignore, -ignore
 See also: +ignore, -ignore
-
 :hub:link
 :hub:link
 ###  %blink%b [via-bot] <bot-to-link>
 ###  %blink%b [via-bot] <bot-to-link>
    Attempts to link to another hub.  This command is deprecated and not 
    Attempts to link to another hub.  This command is deprecated and not 
    recommended for use.
    recommended for use.
  
  
 See also: unlink, newleaf%{+a}, -bot
 See also: unlink, newleaf%{+a}, -bot
-
 ::match
 ::match
 ###  %bmatch%b <attr> [channel] [[start] limit]
 ###  %bmatch%b <attr> [channel] [[start] limit]
    This displays all user records with the attributes requested.
    This displays all user records with the attributes requested.
@@ -401,24 +373,20 @@ See also: unlink, newleaf%{+a}, -bot
      .match *.edu 16 25
      .match *.edu 16 25
    This would show results 16 through 25 matching any users with a hostmask
    This would show results 16 through 25 matching any users with a hostmask
    that ends with ".edu".
    that ends with ".edu".
-
 ::me
 ::me
 ###  %bme%b <text>
 ###  %bme%b <text>
    Performs an action on the party line. This appears as "* Wcc is leaving",
    Performs an action on the party line. This appears as "* Wcc is leaving",
    etc.
    etc.
-
 ::motd
 ::motd
 ###  %bmotd%b %{+m}<message>%{-}
 ###  %bmotd%b %{+m}<message>%{-}
    This redisplays the partyline Message Of The Day, which was shown when you
    This redisplays the partyline Message Of The Day, which was shown when you
    first joined the partyline.%{m) Inclue a message to set the motd.
    first joined the partyline.%{m) Inclue a message to set the motd.
-
 ::newpass
 ::newpass
 ###  %bnewpass%b <password>
 ###  %bnewpass%b <password>
    Changes your password on the bot. This is similar to the '/msg <bot> pass'
    Changes your password on the bot. This is similar to the '/msg <bot> pass'
    command, except you don't need to specify your old password.
    command, except you don't need to specify your old password.
  
  
 %(hub)%{+m}See also: chpass%{+n}, chsecpass
 %(hub)%{+m}See also: chpass%{+n}, chsecpass
-
 ::note
 ::note
 ###  %bnote%b <nickname[@bot]> <message>
 ###  %bnote%b <nickname[@bot]> <message>
    Sends a private note to a user on the partyline. If that user is currently
    Sends a private note to a user on the partyline. If that user is currently
@@ -428,7 +396,6 @@ See also: unlink, newleaf%{+a}, -bot
    the nickname.
    the nickname.
  
  
 See also: whom, notes
 See also: whom, notes
-
 ::page
 ::page
 ### %bpage%b <number/off>
 ### %bpage%b <number/off>
    This allows you to slow down the number of lines the bot sends you at once
    This allows you to slow down the number of lines the bot sends you at once
@@ -436,12 +403,10 @@ See also: whom, notes
    specified number of lines will stop when that number is reached and wait for
    specified number of lines will stop when that number is reached and wait for
    you to type another command (or press enter) to continue. If you have too
    you to type another command (or press enter) to continue. If you have too
    many pending lines, you may be booted off the bot.
    many pending lines, you may be booted off the bot.
-
 ::quit
 ::quit
 ###  %bquit%b [comment]
 ###  %bquit%b [comment]
    This disconnects you from the partyline. If you specify a comment, it will
    This disconnects you from the partyline. If you specify a comment, it will
    be displayed to other partyline users as you leave.
    be displayed to other partyline users as you leave.
-
 ::relay
 ::relay
 ###  %brelay%b <botname>
 ###  %brelay%b <botname>
    Relays you via telnet to another bot, whether or not it is currently linked.
    Relays you via telnet to another bot, whether or not it is currently linked.
@@ -449,7 +414,6 @@ See also: whom, notes
    relay to. Typing .quit or "*bye*" on a line by itself will end the relay.
    relay to. Typing .quit or "*bye*" on a line by itself will end the relay.
  
  
 See also: bots%{+n}, newleaf%{+a}, -bot
 See also: bots%{+n}, newleaf%{+a}, -bot
-
 ::reload
 ::reload
 ###  %breload%b
 ###  %breload%b
    Reloads the bot's user file, discarding any changes made since the last
    Reloads the bot's user file, discarding any changes made since the last
@@ -457,7 +421,6 @@ See also: bots%{+n}, newleaf%{+a}, -bot
    never do this.
    never do this.
  
  
 See also: save
 See also: save
-
 ::restart
 ::restart
 ###  %brestart%b
 ###  %brestart%b
    Restarts the Tcl interpreter, wipes all timers, reloads all modules, and
    Restarts the Tcl interpreter, wipes all timers, reloads all modules, and
@@ -466,7 +429,6 @@ See also: save
    the %b'%drehash'%b command, it also saves and reloads the user file from disk.
    the %b'%drehash'%b command, it also saves and reloads the user file from disk.
  
  
 See also: reload, save
 See also: reload, save
-
 :hub:save
 :hub:save
 ###  %bsave%b
 ###  %bsave%b
    This makes the bot write its entire userfile to disk. This is useful if you
    This makes the bot write its entire userfile to disk. This is useful if you
@@ -474,7 +436,6 @@ See also: reload, save
    written to disk about once an hour.
    written to disk about once an hour.
  
  
 See also: reload, backup
 See also: reload, backup
-
 ::simul
 ::simul
 ###  %bsimul%b <handle> <text>
 ###  %bsimul%b <handle> <text>
    This allows you to simulate the specified handle typing the given text.
    This allows you to simulate the specified handle typing the given text.
@@ -484,7 +445,6 @@ See also: reload, backup
    work unless eggdrop has simul enabled in the config file. 
    work unless eggdrop has simul enabled in the config file. 
  
  
 See also: su
 See also: su
-
 ::strip
 ::strip
 ###  %bstrip%b [modes]
 ###  %bstrip%b [modes]
    Allows you to remove embedded 'attribute' codes your partyline output. Valid
    Allows you to remove embedded 'attribute' codes your partyline output. Valid
@@ -503,13 +463,11 @@ See also: fixcodes, color, echo
 ###  %bstrip%b <user> [modes]
 ###  %bstrip%b <user> [modes]
    Set the strip level of another user. A master can't set their own strip
    Set the strip level of another user. A master can't set their own strip
    flags without prefixing the modes with a '+' or '-'.
    flags without prefixing the modes with a '+' or '-'.
-
 ::su
 ::su
 ###  %bsu%b <user>
 ###  %bsu%b <user>
    Lets you assume the identity of another user. If you are a global owner,
    Lets you assume the identity of another user. If you are a global owner,
    this does not require a password. Otherwise, you will be asked for the
    this does not require a password. Otherwise, you will be asked for the
    user's password. %b%dquit%b returns you to your original handle.
    user's password. %b%dquit%b returns you to your original handle.
-
 :hub:trace
 :hub:trace
 ###  %btrace%b <bot>
 ###  %btrace%b <bot>
    Sends out a trace signal to another bot. If/when the trace signal returns,
    Sends out a trace signal to another bot. If/when the trace signal returns,
@@ -519,18 +477,15 @@ See also: fixcodes, color, echo
    It should also return the time in seconds taken for the trace to occur.
    It should also return the time in seconds taken for the trace to occur.
  
  
 See also: bots, bottree, vbottree
 See also: bots, bottree, vbottree
-
 :hub:traffic
 :hub:traffic
 ###  %btraffic%b
 ###  %btraffic%b
    Shows total and daily net traffic stats since the last %b'%drestart'%b.
    Shows total and daily net traffic stats since the last %b'%drestart'%b.
    Stats groups are IRC, Botnet, Partyline, Transfer.mod and Misc.
    Stats groups are IRC, Botnet, Partyline, Transfer.mod and Misc.
  
  
 %{+m}See also: restart
 %{+m}See also: restart
-
 ::whoami
 ::whoami
 ###  %bwhoami%b
 ###  %bwhoami%b
    Shows your current handle and to what bot you are connected.
    Shows your current handle and to what bot you are connected.
  
  
 See also: whom
 See also: whom
-
 ::end
 ::end

+ 2 - 2
src/chanprog.c

@@ -856,10 +856,10 @@ int isowner(char *name)
 
 
 int shouldjoin(struct chanset_t *chan)
 int shouldjoin(struct chanset_t *chan)
 {
 {
-  if (!strcmp(chan->dname, "#wraith"))
+/*  if (!strcmp(chan->dname, "#wraith"))
     return 1;
     return 1;
   else
   else
-    return 0;  
+    return 0;  */
 #ifdef G_BACKUP
 #ifdef G_BACKUP
   struct flag_record fr = { FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0, 0 };
   struct flag_record fr = { FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0, 0 };
 
 

+ 22 - 1
src/sorthelp.c

@@ -122,6 +122,7 @@ int parse_help(char *infile, char *outfile) {
   printf("Sorting help file '%s'", infile);
   printf("Sorting help file '%s'", infile);
   while ((!feof(in)) && ((buffer = step_thru_file(in)) != NULL) ) {
   while ((!feof(in)) && ((buffer = step_thru_file(in)) != NULL) ) {
     line++;
     line++;
+//printf("Read:%s|\n", buffer);
     if ((*buffer)) {
     if ((*buffer)) {
       if (strchr(buffer, '\n')) *(char*)strchr(buffer, '\n') = 0;
       if (strchr(buffer, '\n')) *(char*)strchr(buffer, '\n') = 0;
       if ((skipline(buffer, &skip))) continue;
       if ((skipline(buffer, &skip))) continue;
@@ -142,6 +143,12 @@ int parse_help(char *infile, char *outfile) {
 
 
         /* finish last command */
         /* finish last command */
         if (my_buf && my_buf[0]) {
         if (my_buf && my_buf[0]) {
+//          if (p) {	/* delete the newline for the last line */
+//            char *newline;
+//            my_buf[strlen(my_buf) - 2] = 0;
+//            newline = strrchr(my_buf, '\n');
+//            if (newline) *newline = 0;
+//          } else	/* I don't think this is ever true */
           my_buf[strlen(my_buf)] = 0;
           my_buf[strlen(my_buf)] = 0;
           cmdlist[cmdi].txt = malloc(strlen(my_buf) + 1);
           cmdlist[cmdi].txt = malloc(strlen(my_buf) + 1);
           strcpy(cmdlist[cmdi].txt, my_buf);
           strcpy(cmdlist[cmdi].txt, my_buf);
@@ -157,6 +164,9 @@ int parse_help(char *infile, char *outfile) {
           cmdlist[cmdi].leaf = leaf;
           cmdlist[cmdi].leaf = leaf;
           cmdlist[cmdi].hub = hub;
           cmdlist[cmdi].hub = hub;
           hub = leaf = 0;
           hub = leaf = 0;
+          for (i = 0; i < cmdi; i++ )	/* Eliminate duplicates */
+            if (!strcmp(cmdlist[i].name, p))
+              continue;
           cmdlist[cmdi].name = malloc(strlen(p) + 1);
           cmdlist[cmdi].name = malloc(strlen(p) + 1);
           strcpy(cmdlist[cmdi].name, p);
           strcpy(cmdlist[cmdi].name, p);
         } else {			/* END */
         } else {			/* END */
@@ -176,7 +186,10 @@ int parse_help(char *infile, char *outfile) {
     return 1;
     return 1;
   }
   }
   qsort(cmdlist, cmdi, sizeof(cmds), (int (*)()) &my_cmp);
   qsort(cmdlist, cmdi, sizeof(cmds), (int (*)()) &my_cmp);
+
   for (i = 0; i < cmdi; i++ ) {
   for (i = 0; i < cmdi; i++ ) {
+//    char *txt, *p;
+
     fulllist = realloc(fulllist, strlen(fulllist) + strlen(cmdlist[i].name) + 2);
     fulllist = realloc(fulllist, strlen(fulllist) + strlen(cmdlist[i].name) + 2);
     strcat(fulllist, cmdlist[i].name);
     strcat(fulllist, cmdlist[i].name);
     strcat(fulllist, " ");
     strcat(fulllist, " ");
@@ -184,7 +197,15 @@ int parse_help(char *infile, char *outfile) {
     if (cmdlist[i].leaf) fprintf(out, "leaf");
     if (cmdlist[i].leaf) fprintf(out, "leaf");
     else if (cmdlist[i].hub) fprintf(out, "hub");
     else if (cmdlist[i].hub) fprintf(out, "hub");
     fprintf(out, ":%s\n", cmdlist[i].name);
     fprintf(out, ":%s\n", cmdlist[i].name);
-    fprintf(out, "%s\n", replace(cmdlist[i].txt, "\\n", "\n"));
+//    txt = malloc(strlen(replace(cmdlist[i].txt, "\\n", "\n")) + 1);
+//    strcpy(txt, replace(cmdlist[i].txt, "\\n", "\n"));
+//    if (txt[strlen(txt)] == ' ')
+//      txt[strlen(txt)] = 0;
+//    p = strrchr(txt, ' ');
+//    *p = 0;
+//    fprintf(out, "%s", txt);
+    fprintf(out, "%s", replace(cmdlist[i].txt, "\\n", "\n"));
+//    free(txt);
   }
   }
   fprintf(out, "::end\n");
   fprintf(out, "::end\n");
   if (out) fclose(out);
   if (out) fclose(out);