+=head2 banned
+
+ $s->banned()
+
+Return true if current user is banned from leaving comments in the blog.
+
+=cut
+
+sub banned {
+ return exists shift->{-ban}
+}
+
+=head2 ban
+
+ $s->ban($identity_url);
+
+Marks user as banned in the current blog
+
+=cut
+
+sub ban {
+ my ($self,$foe) = @_;
+ if (!$self->isowner()) return undef;
+ my %bans;
+ dbmopen %bans,$config{-topdir}."/bans",0644;
+ $bans{$foe}=time();
+}
+
+=head2 _readban
+
+ $session=>{-identity=>$identity,...,_readban($identity)}
+
+Returns aray (-ban => 1) if $identity is recorded in tbe bans dbm file
+in the blog top url
+
+=cut
+
+sub _readban {
+ my $identity = shift;
+ dbmopen %bans,$config{-topdir}."/bans",0644;
+ if (exists $bans{-identity}) {
+ return (-ban=>1);
+ } else {
+ return ();
+ }
+}
+