Look at the date on that post? You expect after two years it would still be valid?soraver wrote:so, where can i find this linknet+s.diff?
there's a 404 there, and eggdrop still doesnt support the +S mode :S
Try Google?
Code: Select all
 tag when posting logs, codeCode: Select all
set ssl_timer 60
set chanlistS  "#chan1 #chan2"
timer $ssl_timer ssl_test
proc ssl_test {} {
  global chanlistS ssl_timer chanmodes
  foreach chan $chanlistS {
    if {[botisop $chan]} {
      if {[string match *S* $chanmodes($chan)] == "0"} {
        pushmode $chan +S
        flushmode $chan
        putlog "SSL: set +S on $chan"
      }
    }
  }
  timer $ssl_timer ssl_test
}
bind dcc n sslstart ssl_start
proc ssl_start {nick uhost arg} {
  global ssl_timer
  timer $ssl_timer ssl_test
}
putlog "LinkNet +S mode support added"
bind dcc n sslstart2 ssl_start2
proc ssl_start2 {nick uhost arg} {
 ssl_test
}
bind raw - 324 testmodes
proc testmodes {from key arg} {
  global chanmodes
  list $arg
  set chan [lindex $arg 1]
  set modes [lindex $arg 2]
  set chanmodes($chan) $modes
}
bind raw - MODE changemodes
proc changemodes {from key arg} {
  global chanmodes
  list $arg
  set chan [lindex $arg 0]
  set modes [lindex $arg 1]
  if {$chanmodes($chan)} {
    set chanmodes($chan) [replacemodes $chanmodes($chan) $modes]
  } else {
    set chanmodes($chan) [replacemodes [getchanmode $chan] $modes]
  }
}
proc replacemodes {oldmodes newmodes} {
  set newmodes [string trim [string trim $newmodes o] v]
  set all [string length $newmodes]
  set plus [string first + $newmodes]
  set plusl [string last + $newmodes]
  set minus [string first - $newmodes]
  set minusl [string last - $newmodes]
  set outmodes $oldmodes
  if {$all > 1} {
    if {$plus==0 && $minus>0} {
      set x 1
      while {$x<$minus} {
        append outmodes [string index $newmodes $x ]
        incr x
      }
      set x [expr $minus + 1]
      while {$x<=$all} {
        set outmodes [string trim $newmodes $x]
        incr x
      }
    } elseif {$minus==0 && $plus>0} {
      set x 1
      while {$x<$plus} {
        append outmodes [string index $newmodes $x ]
        incr x
      }
      set x [expr $plus + 1]
      while {$x<=$all} {
        set outmodes [string trim $newmodes $x]
        incr x
      }
    } elseif {$plus==0 && $minus==-1} {
      append outmodes $plusl
    } elseif {$minus==0 && $plus==-1} {
      set x 1
      while {$x<=$all} {
        set outmodes [string trim $newmodes $x]
        incr x
      }
    } else { putlog "something smells dirty... have u farted at the channel modes?" }
  } else { putlog "something smells dirty... have u farted at the channel modes?" }
  return $outmodes
}