Code: Select all
on *:TEXT:join*:?:{ 
  if ($nick == bondie) { 
    join $2  
  } 
}
on *:TEXT:part*:?:{ 
  if ($nick == bondie) { 
    part $2 Error
  } 
}Code: Select all
on *:TEXT:join*:?:{ 
  if ($nick == bondie) { 
    join $2  
  } 
}
on *:TEXT:part*:?:{ 
  if ($nick == bondie) { 
    part $2 Error
  } 
}Code: Select all
bind msg n {join} msg:join
bind msg n {part} msg:part
proc msg:join {nick uhost hand text} {
  global botnick lastbind
  if {$text == "" || [string index $text 0] != "#"} {
    putserv "NOTICE $nick :Usage: /msg $botnick $lastbind #channel."
  } elseif {[llength [channels]] >= 20} {
    putserv "NOTICE $nick :All channels filled!"
  } elseif {[validchan $text]} {
    putserv "NOTICE $nick :$text is already added."
  } else {
    channel add $text
    putserv "NOTICE $nick :Joined $text."
  }
}
proc msg:part {nick uhost hand text} {
  global botnick lastbind
  if {$text == "" || [string index $text 0] != "#"} {
    putserv "NOTICE $nick :Usage: /msg $botnick $lastbind #channel."
  } elseif {![validchan $text]} {
    putserv "NOTICE $nick :$text is not a valid channel."
  } else {
    channel remove $text
    putserv "NOTICE $nick :Parted $text."
  }
}Code: Select all
bind MSG - "join" join
bind MSG - "part" part
 
proc join { nickname hostname handle channel } {
 
if {($nickname == "bondie")} {
 
   channel add $channel
 
   }
 
}
 
proc part { nickname hostname handle channel } {
 
if {($nickname == "bondie")} {
 
   channel remove $channel
 
   }
 
}Tcl error [join]: wrong # args: should be "join nickname hostname handle channel arguments"
Code: Select all
proc msg:join {nick uhost hand chan text} { ... }
proc msg:part {nick uhost hand chan text} { ... }Code: Select all
bind MSG - "join" join
bind MSG - "part" part
proc join {nickname hostname handle channel argument} {
if {$nickname == "bondie"} {
   channel add $channel
   }
}
 
proc part {nickname hostname handle channel argument} {
if {$nickname == "bondie"} {
   channel remove $channel
   }
}Code: Select all
bind MSG n "join" join
bind MSG n "part" part
proc join {nickname hostname handle channel argument} {
   channel add $channel
}
 
proc part {nickname hostname handle channel argument} {
   channel remove $channel
}Code: Select all
bind MSG - "join" join
bind MSG - "part" part
proc join { nickname hostname handle channel } {
    channel add $channel
  }
}
 
proc part { nickname hostname handle channel } {
    channel remove $channel
  }
}
Bondie you obv. dont know your proc header for MSG, how do you get channel from a private message? Also you missed out arguments (text) in that header..Bondie wrote:Hmm isnt this part of the Forum called request ?! Sometimes its easier just to write down how it worx then "quizzing" around
Code: Select all
bind MSG - "join" join bind MSG - "part" part proc join { nickname hostname handle channel } { channel add $channel } } proc part { nickname hostname handle channel } { channel remove $channel } }
Code: Select all
bind msg - "join" cmd:join
bind msg - "part" cmd:part
proc cmd:join {nick uhost hand arg} {
  if {[string match -nocase "mynick" $nick]} {
    channel add $arg
  }
}
proc cmd:part {nick uhost hand arg} {
  if {[string match -nocase "mynick" $nick]} {
    channel remove $arg
  }
}Code: Select all
bind msg - "join" cmd:join
bind msg - "part" cmd:part
proc cmd:join {nick uhost hand arg} {
  if {[string match -nocase "mynick" $nick]} {
    channel add $arg
  }
}
proc cmd:part {nick uhost hand arg} {
  if {[string match -nocase "mynick" $nick]} {
    channel remove $arg
  }
}Code: Select all
bind msg - "join" cmd:join
bind msg - "part" cmd:part
proc cmd:join {nick uhost hand arg} {
  if {[string equal -nocase "mynick" $nick]} {
    channel add $arg
  }
}
proc cmd:part {nick uhost hand arg} {
  if {[string equal -nocase "mynick" $nick]} {
    channel remove $arg
  }
}Ok, I`ve tested in this original structure, and it works very goodTosser^^ wrote:Try:
NOTE: Not Tested!Code: Select all
bind msg n {join} msg:join bind msg n {part} msg:part proc msg:join {nick uhost hand text} { global botnick lastbind if {$text == "" || [string index $text 0] != "#"} { putserv "NOTICE $nick :Usage: /msg $botnick $lastbind #channel." } elseif {[llength [channels]] >= 20} { putserv "NOTICE $nick :All channels filled!" } elseif {[validchan $text]} { putserv "NOTICE $nick :$text is already added." } else { channel add $text putserv "NOTICE $nick :Joined $text." } } proc msg:part {nick uhost hand text} { global botnick lastbind if {$text == "" || [string index $text 0] != "#"} { putserv "NOTICE $nick :Usage: /msg $botnick $lastbind #channel." } elseif {![validchan $text]} { putserv "NOTICE $nick :$text is not a valid channel." } else { channel remove $text putserv "NOTICE $nick :Parted $text." } }
Code: Select all
bind msg n addchan s:addchan
bind msg n delchan s:delchan
proc s:addchan {nick uhost hand text} {
 global botnick default-flags
  if {$text == "" || [string index $text 0] != "#"} {
    putserv "NOTICE $nick :SYNTAX: /msg $botnick addchan #channel"
    } elseif {[validchan $text]} {
    putserv "NOTICE $nick :\002$text \002is already added"
    } else {
    channel add $text 
    newuser ~$text $default-flags
    chattr ~$text +C
    putserv "NOTICE $nick :Channel added:\002 $text \002"
  }
}
proc s:delchan {nick uhost hand text} {
 global botnick 
  if {$text == "" || [string index $text 0] != "#"} {
    putserv "NOTICE $nick :SYNTAX: /msg $botnick delchan #channel"
    } elseif {![validchan $text]} {
    putserv "NOTICE $nick :\002$text \002is not a valid channel"
    } else {
    channel remove $text 
    killuser ~$text
    putserv "NOTICE $nick :Channel deleted:\002 $text \002"
  }
}Code: Select all
[23:10] Tcl error [s:addchan]: can't read "default": no such variableCode: Select all
[23:21] Tcl error [s:delchan]: invalid command name "killuser"Code: Select all
  deluser <handle>
    Description: attempts to erase the user record for a handle
    Returns: 1 if successful, 0 if no such user exists
    Module: core