Index: doc/user-guide/commands.xml
===================================================================
--- doc/user-guide/commands.xml	(revision 1bf1ae6f25ff56894d67999791802aa864eaa02b)
+++ doc/user-guide/commands.xml	(revision cd428e473fe4428041722fd373badef890edebd9)
@@ -134,4 +134,5 @@
 			<syntax>account set &lt;account id&gt;/&lt;setting&gt;</syntax>
 			<syntax>account set &lt;account id&gt;/&lt;setting&gt; &lt;value&gt;</syntax>
+			<syntax>account set -del &lt;account id&gt;/&lt;setting&gt;</syntax>
 
 			<description>
@@ -141,5 +142,5 @@
 				
 				<para>
-					For more infomation about a setting, see <emphasis>help set &lt;setting&gt;</emphasis>.
+					For more infomation about a setting, see <emphasis>help set &lt;setting&gt;</emphasis>. For details about the syntax of this command, see <emphasis>help set</emphasis>.
 				</para>
 				
@@ -246,10 +247,13 @@
 	<bitlbee-command name="set">
 		<short-description>Miscellaneous settings</short-description>
-		<syntax>set [&lt;variable&gt; [&lt;value&gt;]]</syntax>
-
-		<description>
-
-			<para>
-				Without any arguments, this command lists all the set variables. You can also specify a single argument, a variable name, to get that variable's value. To change this value, specify the new value as the second argument.
+		<syntax>set</syntax>
+		<syntax>set &lt;variable&gt;</syntax>
+		<syntax>set &lt;variable&gt; &lt;value&gt;</syntax>
+		<syntax>set -del &lt;variable&gt;</syntax>
+
+		<description>
+
+			<para>
+				Without any arguments, this command lists all the set variables. You can also specify a single argument, a variable name, to get that variable's value. To change this value, specify the new value as the second argument. With <emphasis>-del</emphasis> you can reset a setting to its default value.
 			</para>
 
Index: root_commands.c
===================================================================
--- root_commands.c	(revision 1bf1ae6f25ff56894d67999791802aa864eaa02b)
+++ root_commands.c	(revision cd428e473fe4428041722fd373badef890edebd9)
@@ -368,5 +368,9 @@
 		}
 		
-		acc_handle = g_strdup( cmd[2] );
+		if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
+			acc_handle = g_strdup( cmd[3] );
+		else
+			acc_handle = g_strdup( cmd[2] );
+		
 		if( ( tmp = strchr( acc_handle, '/' ) ) )
 		{
@@ -374,7 +378,6 @@
 			set_name = tmp + 1;
 		}
-		a = account_get( irc, acc_handle );
-		
-		if( a == NULL )
+		
+		if( ( a = account_get( irc, acc_handle ) ) == NULL )
 		{
 			g_free( acc_handle );
@@ -400,8 +403,10 @@
 			}
 			
-			set_setstr( &a->set, set_name, cmd[3] );
-			
 			if( ( strcmp( cmd[3], "=" ) ) == 0 && cmd[4] )
 				irc_usermsg( irc, "Warning: Correct syntax: \002account set <variable> <value>\002 (without =)" );
+			else if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 )
+				set_reset( &a->set, set_name );
+			else
+				set_setstr( &a->set, set_name, cmd[3] );
 		}
 		if( set_name ) /* else 'forgotten' on purpose.. Must show new value after changing */
@@ -419,5 +424,5 @@
 			{
 				if( s->value || s->def )
-					irc_usermsg( irc, "%s = `%s'", s->key, s->value?s->value:s->def );
+					irc_usermsg( irc, "%s = `%s'", s->key, s->value ? s->value : s->def );
 				else
 					irc_usermsg( irc, "%s is empty", s->key );
@@ -740,18 +745,31 @@
 static void cmd_set( irc_t *irc, char **cmd )
 {
+	char *set_name;
+	
 	if( cmd[1] && cmd[2] )
 	{
-		set_setstr( &irc->set, cmd[1], cmd[2] );
-		
 		if( ( strcmp( cmd[2], "=" ) ) == 0 && cmd[3] )
+		{
 			irc_usermsg( irc, "Warning: Correct syntax: \002set <variable> <value>\002 (without =)" );
+			return;
+		}
+		else if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
+		{
+			set_reset( &irc->set, cmd[2] );
+			set_name = cmd[2];
+		}
+		else
+		{
+			set_setstr( &irc->set, cmd[1], cmd[2] );
+			set_name = cmd[1];
+		}
 	}
 	if( cmd[1] ) /* else 'forgotten' on purpose.. Must show new value after changing */
 	{
-		char *s = set_getstr( &irc->set, cmd[1] );
-		if( s )
-			irc_usermsg( irc, "%s = `%s'", cmd[1], s );
-		else
-			irc_usermsg( irc, "%s is empty", cmd[1] );
+		char *s = set_getstr( &irc->set, set_name );
+ 		if( s )
+			irc_usermsg( irc, "%s = `%s'", set_name, s );
+		else
+			irc_usermsg( irc, "%s is empty", set_name );
 	}
 	else
@@ -761,5 +779,5 @@
 		{
 			if( s->value || s->def )
-				irc_usermsg( irc, "%s = `%s'", s->key, s->value?s->value:s->def );
+				irc_usermsg( irc, "%s = `%s'", s->key, s->value ? s->value : s->def );
 			else
 				irc_usermsg( irc, "%s is empty", s->key );
Index: set.c
===================================================================
--- set.c	(revision 1bf1ae6f25ff56894d67999791802aa864eaa02b)
+++ set.c	(revision cd428e473fe4428041722fd373badef890edebd9)
@@ -168,4 +168,13 @@
 }
 
+void set_reset( set_t **head, char *key )
+{
+	set_t *s;
+	
+	s = set_find( head, key );
+	if( s )
+		set_setstr( head, key, s->def );
+}
+
 char *set_eval_int( set_t *set, char *value )
 {
Index: set.h
===================================================================
--- set.h	(revision 1bf1ae6f25ff56894d67999791802aa864eaa02b)
+++ set.h	(revision cd428e473fe4428041722fd373badef890edebd9)
@@ -88,4 +88,5 @@
 int set_setint( set_t **head, char *key, int value );
 void set_del( set_t **head, char *key );
+void set_reset( set_t **head, char *key );
 
 /* Two very useful generic evaluators. */
